Commit c4a5264b authored by Jens Segers's avatar Jens Segers Committed by GitHub

Merge pull request #1235 from daiduong47/master

Update README.md
parents 165bf3a3 4b6a3d3f
......@@ -976,7 +976,8 @@ DB::collection('users')->where('name', 'John')
You can apply projections to your queries using the `project` method.
```php
DB::collection('items')->project(['tags' => array('$slice' => 1]))->get();
DB::collection('items')->project(['tags' => ['$slice' => 1]])->get();
DB::collection('items')->project(['tags' => ['$slice' => [3, 7]]])->get();
```
**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