-
Type: Bug
-
Resolution: Works as Designed
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: drivers
-
Labels:
-
Environment:
*Location*: https://docs.mongodb.com/php-library/master/tutorial/collation/#find-with-sort
*User-Agent*: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36
*Screen Resolution*: 1920 x 1080
Please add a more described description in aggregation. Check the following example.
return $this->posts->aggregate( [ [ '$lookup' => [ 'from' => 'authors', 'localField' => 'author_id', 'foreignField' => '_id', 'as' => 'author', ], ], ['$limit' => 5], ['$skip' => 0], ['$sort' => ['created_at' => -1]] ], [ ] )->toArray();
- related to
-
PHPLIB-577 Ensure each API method has at least one example
- Closed