Skip to content

Commit 322dbbb

Browse files
committed
Readme updates
1 parent 5c6a971 commit 322dbbb

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,12 @@ Everything else works just like the original Eloquent model. Read more about the
8383
Query Builder
8484
-------------
8585

86-
The MongoDB query builder allows you to execute queries, just like the original query builder (note that we are using the previously created alias here):
86+
Once selected a mongodb connection, you can execute queries just like the original query builder. The main difference is that we are using `collection` instead of `table` (but table will work as well), and some additional operations like `push` and `pull`.
87+
88+
// With custom connection
89+
$user = DB::connection('mongodb')->collection('users')->get();
8790

91+
// Using default connection
8892
$users = DB::collection('users')->get();
8993
$user = DB::collection('users')->where('name', 'John')->first();
9094

0 commit comments

Comments
 (0)