Skip to content

Commit 75c2e7e

Browse files
authored
Update README.md
Change DB::collection('items')->project(['tags' => array('$slice' => 1]))->get(); To DB::collection('items')->project(['tags' => array('$slice' => 1)])->get();
1 parent 02ca494 commit 75c2e7e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -885,7 +885,7 @@ DB::collection('users')->where('name', 'John')
885885
You can apply projections to your queries using the `project` method.
886886

887887
```php
888-
DB::collection('items')->project(['tags' => array('$slice' => 1]))->get();
888+
DB::collection('items')->project(['tags' => array('$slice' => 1)])->get();
889889
```
890890

891891
**Projections with Pagination**

0 commit comments

Comments
 (0)