Commit 75c2e7e1 authored by Johnny Dao's avatar Johnny Dao Committed by GitHub

Update README.md

Change
DB::collection('items')->project(['tags' => array('$slice' => 1]))->get();
To
DB::collection('items')->project(['tags' => array('$slice' => 1)])->get();
parent 02ca494f
...@@ -885,7 +885,7 @@ DB::collection('users')->where('name', 'John') ...@@ -885,7 +885,7 @@ DB::collection('users')->where('name', 'John')
You can apply projections to your queries using the `project` method. You can apply projections to your queries using the `project` method.
```php ```php
DB::collection('items')->project(['tags' => array('$slice' => 1]))->get(); DB::collection('items')->project(['tags' => array('$slice' => 1)])->get();
``` ```
**Projections with Pagination** **Projections with Pagination**
......
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