Skip to content

Commit e9aa9de

Browse files
committed
RR feedback 2
1 parent e2145b6 commit e9aa9de

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

docs/usage-examples/findOne.txt

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ Find a Document
77
You can retrieve a single document from a collection by chaining the ``where()`` and
88
``first()`` methods on an Eloquent model or a query builder.
99

10-
Pass a query filter to the ``where()`` method and call the ``first()`` method to return
11-
one document in the collection that matches the filter. If multiple documents match the
12-
query filter, ``first()`` returns the first matching document according to the documents'
10+
Pass a query filter to the ``where()`` method and then call the ``first()`` method to
11+
return one document in the collection that matches the filter. If multiple documents match
12+
the query filter, ``first()`` returns the first matching document according to the documents'
1313
:term:`natural order` in the database or according to the sort order that you can specify
1414
by using the ``orderBy()`` method.
1515

@@ -25,7 +25,7 @@ to represent the ``movies`` collection.
2525
This example performs the following actions:
2626

2727
- Defines a query filter that matches documents in which the value of the ``directors`` field
28-
is ``"Rob Reiner"``
28+
includes ``'Rob Reiner'``
2929
- Retrieves the first document that matches the query filter, according to the sort order
3030
specified by the ``orderBy()`` method
3131

@@ -42,8 +42,15 @@ the HTML code that specifies a view, select the :guilabel:`View File Code` tab.
4242

4343
.. input::
4444
:language: php
45-
46-
class MovieController
45+
46+
<?php
47+
48+
namespace App\Http\Controllers;
49+
50+
use App\Models\Movie;
51+
use Illuminate\Http\Request;
52+
53+
class MovieController extends Controller
4754
{
4855
public function show()
4956
{

0 commit comments

Comments
 (0)