Skip to content

Commit b8ce7a5

Browse files
authored
Merge pull request #1283 from pavemaksim/pavemaksim-patch-config-docs
DSN configuration example added to readme
2 parents 5ecbf0b + 771ee7a commit b8ce7a5

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,18 @@ You can connect to multiple servers or replica sets with the following configura
143143
],
144144
```
145145

146+
Alternatively, you can use MongoDB connection string:
147+
148+
```php
149+
'mongodb' => [
150+
'driver' => 'mongodb',
151+
'dsn' => env('DB_DSN'),
152+
'database' => env('DB_DATABASE'),
153+
],
154+
```
155+
156+
Please refer to MongoDB official docs for its URI format: https://docs.mongodb.com/manual/reference/connection-string/
157+
146158
Eloquent
147159
--------
148160

0 commit comments

Comments
 (0)