Skip to content

Commit ffcc0a5

Browse files
author
Chris Cho
committed
fixes
1 parent d6397cb commit ffcc0a5

File tree

6 files changed

+39
-30
lines changed

6 files changed

+39
-30
lines changed

docs/quick-start.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,12 @@ required) MongoDB Atlas deployment by following the steps in this guide.
4545
Follow the steps in this guide to create a sample Laravel web application
4646
that connects to a MongoDB deployment.
4747

48+
.. tip::
49+
50+
You can download the complete web application project by cloning the
51+
`laravel-quickstart <https://github.com/mongodb-university/laravel-quickstart>`__
52+
GitHub repository.
53+
4854
.. button:: Next: Download and Install
4955
:uri: /quick-start/download-and-install/
5056

docs/quick-start/configure-mongodb.txt

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ Configure Your MongoDB Connection
1616

1717
.. step:: Set the Connection String in the Database Configuration
1818

19-
Navigate to the ``config`` directory from your application root directory.
20-
Open the ``database.php`` file and set the default database connection
21-
to ``mongodb`` as shown in the following line:
19+
Open the ``database.php`` file in the ``config`` directory and
20+
set the default database connection to ``mongodb`` as shown
21+
in the following line:
2222

2323
.. code-block:: php
2424

@@ -27,7 +27,7 @@ Configure Your MongoDB Connection
2727
Add the following highlighted ``mongodb`` entry to the ``connections`` array
2828
in the same file. Replace the ``<connection string>`` placeholder with the
2929
connection string that you copied from the :ref:`laravel-quick-start-connection-string`
30-
step of this guide.
30+
step in the following code example:
3131

3232
.. code-block:: php
3333
:emphasize-lines: 2-6
@@ -41,12 +41,10 @@ Configure Your MongoDB Connection
4141

4242
// ...
4343

44-
4544
.. step:: Add the Laravel MongoDB Provider
4645

47-
48-
From the ``config`` directory, open the ``app.php`` file and add
49-
the following entry into the ``providers`` array:
46+
Open the ``app.php`` in the ``config`` directory and
47+
add the following entry into the ``providers`` array:
5048

5149
.. code-block::
5250

docs/quick-start/create-a-connection-string.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@ The connection string includes the hostname or IP address and
1313
port of your deployment, the authentication mechanism, user credentials
1414
when applicable, and connection options.
1515

16-
To connect to an instance or deployment not hosted on Atlas, see TODO
16+
To connect to an instance or deployment not hosted on Atlas, see the
17+
:manual:`Connection Strings </reference/connection-string/>` in the Server
18+
manual.
1719

1820
.. procedure::
1921
:style: connected

docs/quick-start/next-steps.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ In this tutorial, you created a Laravel web application that uses the
2222
of a query, and write data to a MongoDB deployment hosted on
2323
MongoDB Atlas.
2424

25+
You can download the web application project by cloning the
26+
`laravel-quickstart <https://github.com/mongodb-university/laravel-quickstart>`__
27+
GitHub repository.
28+
2529
Learn more about {+odm-short+} features from the following resources:
2630

2731
- :ref:`laravel-eloquent-models`: use Eloquent model classes to work

docs/quick-start/view-data.txt

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,10 @@ View Sample MongoDB Data
1616

1717
.. step:: Create a Sample Model and Controller
1818

19-
Create a model called ``Movie`` to access data from the sample ``movies``
20-
collection in your MongoDB databse. You can create the model with a
21-
corresponding resource controller by running the following command:
19+
Create a model called ``Movie`` to represent data from the sample
20+
``movies`` collection in your MongoDB database. You can create the
21+
model with a corresponding resource controller by running the
22+
following command:
2223

2324
.. code-block:: bash
2425

@@ -36,13 +37,12 @@ View Sample MongoDB Data
3637

3738
.. step:: Edit the Model to use {+odm-short+}
3839

39-
Navigate to the ``app/Models`` directory and open the ``Movie.php`` file.
40-
Edit the following information in the file:
40+
Open the ``Movie.php`` model in your ``app/Models`` directory and
41+
make the following edits:
4142

4243
- Replace the ``Illuminate\Database\Eloquent\Model`` import with ``MongoDB\Laravel\Eloquent\Model``
4344
- Specify ``mongodb`` in the ``$connection`` field
4445

45-
4646
Your ``Movie.php`` file should contain the following code:
4747

4848
.. code-block:: php
@@ -55,14 +55,14 @@ View Sample MongoDB Data
5555

5656
class Movie extends Model
5757
{
58-
protected $connection = 'mongodb';
58+
protected $connection = 'mongodb';
5959
}
6060

6161
.. step:: Add a Controller Function
6262

63-
Navigate to the ``app/Http/Controllers`` directory and open the
64-
``MovieController.php`` file. Replace the ``show()`` function
65-
with the following code to retrieve results that match a
63+
Open the ``MovieController.php`` file in your ``app/Http/Controllers``
64+
directory. Replace the ``show()`` function with the
65+
following code to retrieve results that match a
6666
database query and render it in the view:
6767

6868
.. code-block:: php
@@ -80,7 +80,7 @@ View Sample MongoDB Data
8080

8181
.. step:: Add a Web Route
8282

83-
Navigate to the ``routes`` directory and open the ``web.php`` file.
83+
Open the ``web.php`` file in the ``routes`` directory.
8484
Add an import for the ``MovieController`` and a route called
8585
``browse_movies`` as shown in the following code:
8686

@@ -95,8 +95,8 @@ View Sample MongoDB Data
9595

9696
.. step:: Generate a View
9797

98-
Navigate to the application root directory and run the following
99-
command to create a view that displays movie data:
98+
Run the following command from the application root directory
99+
to create a view that displays movie data:
100100

101101
.. code-block:: bash
102102

@@ -107,9 +107,8 @@ View Sample MongoDB Data
107107

108108
INFO View [resources/views/browse_movie.blade.php] created successfully.
109109

110-
Navigate to the ``resources/views`` directory and open the
111-
``browse_movie.blade.php`` file. Replace the contents with the
112-
following code:
110+
Open the ``browse_movie.blade.php`` view file in the ``resources/views``
111+
directory. Replace the contents with the following code:
113112

114113
.. code-block:: bash
115114

@@ -139,7 +138,7 @@ View Sample MongoDB Data
139138

140139
.. step:: Start your Laravel Application
141140

142-
Navigate to the application root directory and run the following command
141+
Run the following command from the application root directory
143142
to start your PHP built-in web server:
144143

145144
.. code-block:: bash
@@ -158,7 +157,7 @@ View Sample MongoDB Data
158157
.. step:: View the Movie Data
159158

160159
Open http://127.0.0.1:8000/browse_movies in your web browser. If it runs
161-
successuflly, you should see a list of movies and details about each of them.
160+
successfully, you should see a list of movies and details about each of them.
162161

163162
.. tip::
164163

docs/quick-start/write-data.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,9 @@ Post an API Request to Write Data
4949
.. step:: Update the Movie Model
5050

5151
Add the movie detail fields to the ``$fillable`` array
52-
of the ``Movie`` model.
53-
Update the ``Movie`` class at ``app/Models/Movie.php``
54-
52+
of the ``Movie`` model. After adding them, the ``Movie``
53+
class at ``app/Models/Movie.php`` should contain the
54+
following code:
5555

5656
.. code-block:: php
5757
:emphasize-lines: 4

0 commit comments

Comments
 (0)