Commit 322dbbb7 authored by Jens Segers's avatar Jens Segers

Readme updates

parent 5c6a9717
...@@ -83,8 +83,12 @@ Everything else works just like the original Eloquent model. Read more about the ...@@ -83,8 +83,12 @@ Everything else works just like the original Eloquent model. Read more about the
Query Builder Query Builder
------------- -------------
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): 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`.
// With custom connection
$user = DB::connection('mongodb')->collection('users')->get();
// Using default connection
$users = DB::collection('users')->get(); $users = DB::collection('users')->get();
$user = DB::collection('users')->where('name', 'John')->first(); $user = DB::collection('users')->where('name', 'John')->first();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment