Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-10388

Comment on: "docs-php-library/tutorial/collation.txt"

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Works as Designed
    • Icon: Major - P3 Major - P3
    • None
    • None
    • drivers

    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

        Activity

          People

            jmikola@mongodb.com Jeremy Mikola
            cpapidas@gmail.com christos papidas
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              3 years, 25 weeks, 5 days ago