File tree 3 files changed +13
-20
lines changed
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:
130
130
131
131
// Results are truncated
132
132
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 ) ...
148
138
149
139
.. 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:
47
47
- Uses the ``Movie`` Eloquent model to represent the ``movies``
48
48
collection in the ``sample_mflix`` database
49
49
- Inserts a document into the ``movies`` collection
50
+ - Prints the newly inserted document
50
51
51
52
The example calls the ``create()`` method to insert a document
52
53
that contains the following fields and values:
@@ -85,6 +86,7 @@ each corresponding query syntax:
85
86
- Accesses the ``movies`` collection by calling the ``table()``
86
87
method from the ``DB`` facade
87
88
- Inserts a document into the ``movies`` collection
89
+ - Prints whether the insert operation succeeds
88
90
89
91
The example calls the ``insert()`` method to insert a document
90
92
that contains the following fields and values:
Original file line number Diff line number Diff line change @@ -17,12 +17,13 @@ Update a Document
17
17
:depth: 1
18
18
:class: singlecol
19
19
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.
22
22
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.
26
27
27
28
.. tip::
28
29
You can’t perform that action at this time.
0 commit comments