@@ -66,8 +66,8 @@ The following example shows the syntax of a query builder call:
6666
6767This guide provides examples of the following types of query builder operations:
6868
69- - :ref:`laravel-options-query-builder`
7069- :ref:`laravel-retrieve-query-builder`
70+ - :ref:`laravel-options-query-builder`
7171- :ref:`laravel-modify-results-query-builder`
7272- :ref:`laravel-mongodb-read-query-builder`
7373- :ref:`laravel-mongodb-write-query-builder`
@@ -86,33 +86,6 @@ of the Quick Start.
8686To perform read and write operations by using the query builder, import the
8787``Illuminate\Support\Facades\DB`` facade and compose your query.
8888
89- .. _laravel-options-query-builder:
90-
91- Set Query-Level Options
92- -----------------------
93-
94- You can modify the way that the {+odm-short+} performs queries by
95- setting options on the query builder. You can pass an array of options
96- to the ``options()`` query builder method to specify options for the
97- query.
98-
99- The following code demonstrates how to attach a comment to
100- a query:
101-
102- .. literalinclude:: /includes/query-builder/QueryBuilderTest.php
103- :language: php
104- :dedent:
105- :start-after: begin options
106- :end-before: end options
107-
108- The query builder accepts the same options that you can set for
109- the :phpmethod:`find() <phpmethod.MongoDB\\Collection::find()>` method in the
110- {+php-library+}. Some of the options to modify query results, such as
111- ``skip``, ``sort``, and ``limit``, are settable directly as query
112- builder methods and are described in the
113- :ref:`laravel-modify-results-query-builder` section of this guide. We
114- recommend that you use these methods instead of passing them as options.
115-
11689.. _laravel-retrieve-query-builder:
11790
11891Retrieve Matching Documents
@@ -638,6 +611,33 @@ value of ``imdb.rating`` of those matches by using the
638611 :start-after: begin aggregation with filter
639612 :end-before: end aggregation with filter
640613
614+ .. _laravel-options-query-builder:
615+
616+ Set Query-Level Options
617+ -----------------------
618+
619+ You can modify the way that the {+odm-short+} performs operations by
620+ setting options on the query builder. You can pass an array of options
621+ to the ``options()`` query builder method to specify options for the
622+ query.
623+
624+ The following code demonstrates how to attach a comment to
625+ a query:
626+
627+ .. literalinclude:: /includes/query-builder/QueryBuilderTest.php
628+ :language: php
629+ :dedent:
630+ :start-after: begin options
631+ :end-before: end options
632+
633+ The query builder accepts the same options that you can set for
634+ the :phpmethod:`find() <phpmethod.MongoDB\\Collection::find()>` method in the
635+ {+php-library+}. Some of the options to modify query results, such as
636+ ``skip``, ``sort``, and ``limit``, are settable directly as query
637+ builder methods and are described in the
638+ :ref:`laravel-modify-results-query-builder` section of this guide. We
639+ recommend that you use these methods instead of passing them as options.
640+
641641.. _laravel-modify-results-query-builder:
642642
643643Modify Query Results
0 commit comments