File tree Expand file tree Collapse file tree 3 files changed +13
-20
lines changed Expand file tree Collapse file tree 3 files changed +13
-20
lines changed Original file line number Diff line number Diff line change @@ -130,20 +130,10 @@ each corresponding query syntax:
130130
131131 // Results are truncated
132132
133- [
134- {
135- "_id": ...,
136- "runtime": 1256,
137- "title": "Centennial",
138- ...,
139- },
140- {
141- "_id": ...,
142- "runtime": 1140,
143- "title": "Baseball",
144- ...,
145- },
146- ...
147- ]
133+ Illuminate\Support\Collection Object ( [items:protected] =>
134+ Array ( [0] => Array ( [_id] => ... [runtime] => 1256
135+ [title] => Centennial [1] => Array
136+ ( [_id] => ... [runtime] => 1140
137+ [title] => Baseball ) ...
148138
149139.. include:: /includes/usage-examples/fact-edit-laravel-app.rst
Original file line number Diff line number Diff line change @@ -47,6 +47,7 @@ each corresponding query syntax:
4747 - Uses the ``Movie`` Eloquent model to represent the ``movies``
4848 collection in the ``sample_mflix`` database
4949 - Inserts a document into the ``movies`` collection
50+ - Prints the newly inserted document
5051
5152 The example calls the ``create()`` method to insert a document
5253 that contains the following fields and values:
@@ -85,6 +86,7 @@ each corresponding query syntax:
8586 - Accesses the ``movies`` collection by calling the ``table()``
8687 method from the ``DB`` facade
8788 - Inserts a document into the ``movies`` collection
89+ - Prints whether the insert operation succeeds
8890
8991 The example calls the ``insert()`` method to insert a document
9092 that contains the following fields and values:
Original file line number Diff line number Diff line change @@ -17,12 +17,13 @@ Update a Document
1717 :depth: 1
1818 :class: singlecol
1919
20- You can update a document in a collection by retrieving a single document and calling
21- the ``update()`` method on an Eloquent model or a query builder .
20+ You can update a document in a collection by retrieving a single
21+ document and calling the ``update()`` method on an Eloquent model.
2222
23- Pass a query filter to the ``where()`` method, sort the matching documents, and call the
24- ``first()`` method to retrieve only the first document. Then, update this matching document
25- by passing your intended document changes to the ``update()`` method.
23+ Pass a query filter to the ``where()`` method, sort the matching
24+ documents, and call the ``first()`` method to retrieve only the first
25+ document. Then, update this matching document by passing your intended
26+ document changes to the ``update()`` method.
2627
2728.. tip::
2829
You can’t perform that action at this time.
0 commit comments