Details
-
Bug
-
Status: Closed
-
Major - P3
-
Resolution: Works as Designed
-
None
-
None
-
*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
Description
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();
|
Attachments
Issue Links
- related to
-
PHPLIB-577 Ensure each API method has at least one example
-
- Closed
-