Skip to content

Commit 771ee7a

Browse files
authored
DSN configuration example added to readme
1 parent c4a5264 commit 771ee7a

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)