Home > Enterprise >  Laravel MongoDB change write concern from connection string
Laravel MongoDB change write concern from connection string

Time:09-28

how can I change the write concern of my MongoDB connection with Laravel, any further informations about the write concern in mongoDB would be appreciated

CodePudding user response:

you can set your write concern on the connection level by setting the w parameter inside the connection string :
mongodb srv://Host_Credentials/database?retryWrites=true&w=1
you can set it by changing the w parameter.
https://docs.mongodb.com/manual/reference/write-concern/

  • Related