Commit 4b6a3d3f authored by Johnny Dao's avatar Johnny Dao Committed by GitHub

Update README.md

Update more guide for $slide and $skip
parent 75c2e7e1
...@@ -885,7 +885,8 @@ DB::collection('users')->where('name', 'John') ...@@ -885,7 +885,8 @@ 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' => ['$slice' => 1]])->get();
DB::collection('items')->project(['tags' => ['$slice' => [3, 7]]])->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