Skip to content

Commit 96b5a8a

Browse files
author
Chris Cho
committed
PRR fixes
1 parent 38b94c2 commit 96b5a8a

File tree

9 files changed

+58
-56
lines changed

9 files changed

+58
-56
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@ composer.phar
99
phpunit.xml
1010
phpstan.neon
1111
/.cache/
12+
docs/.vscode

docs/includes/quick-start/troubleshoot.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.. note::
22

3-
If you run into issues on this step, ask for help in the
3+
If you run into issues, ask for help in the
44
:community-forum:`MongoDB Community Forums <>` or submit feedback by using
55
the :guilabel:`Share Feedback` tab on the right or bottom right side of the
66
page.

docs/quick-start.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ Quick Start
2020
Overview
2121
--------
2222

23-
This guide shows you how to add {+odm-long+} to a new Laravel web application,
24-
connect to a MongoDB cluster hosted on MongoDB Atlas, and how to perform
23+
This guide shows you how to add the {+odm-long+} to a new Laravel web
24+
application, connect to a MongoDB cluster hosted on MongoDB Atlas, and perform
2525
read and write operations on the data.
2626

2727
.. tip::
@@ -32,7 +32,7 @@ read and write operations on the data.
3232
MongoDB Developer Center tutorial.
3333

3434
You can learn how to set up a local Laravel development environment
35-
and perform CRUD operations by taking the
35+
and perform CRUD operations by viewing the
3636
:mdbu-course:`Getting Started with Laravel and MongoDB </getting-started-with-laravel-and-mongodb>`
3737
MongoDB University Learning Byte.
3838

docs/quick-start/configure-mongodb.txt

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

4242
// ...
4343

44-
.. step:: Add the Laravel MongoDB Provider
44+
.. step:: Add the Laravel MongoDB Provider
4545

46-
Open the ``app.php`` in the ``config`` directory and
47-
add the following entry into the ``providers`` array:
46+
Open the ``app.php`` file in the ``config`` directory and
47+
add the following entry into the ``providers`` array:
4848

49-
.. code-block::
49+
.. code-block::
5050

51-
MongoDB\Laravel\MongoDBServiceProvider::class,
51+
MongoDB\Laravel\MongoDBServiceProvider::class,
5252

5353
.. include:: /includes/quick-start/troubleshoot.rst
5454

5555
.. button:: Next: View Sample MongoDB Data
56-
:uri: /quick-start/view-data/
56+
:uri: /quick-start/view-data/

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ 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 the
16+
To connect to an instance or deployment not hosted on Atlas, see
1717
:manual:`Connection Strings </reference/connection-string/>` in the Server
1818
manual.
1919

@@ -24,7 +24,7 @@ manual.
2424

2525
To retrieve your connection string for the deployment that
2626
you created in the :ref:`previous step <laravel-quick-start-create-deployment>`,
27-
log in to your Atlas account and navigate to the
27+
log in to your Atlas account. Then, navigate to the
2828
:guilabel:`Database` section and click the :guilabel:`Connect` button
2929
for your new deployment.
3030

@@ -38,7 +38,7 @@ manual.
3838

3939
Select the :guilabel:`Password (SCRAM)` authentication mechanism.
4040

41-
Deselect the :guilabel:`Include full driver code example` to view
41+
Deselect the :guilabel:`Include full driver code example` option to view
4242
the connection string.
4343

4444
.. step:: Copy your Connection String

docs/quick-start/download-and-install.txt

Lines changed: 26 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -33,19 +33,18 @@ to a Laravel web application.
3333

3434
.. step:: Install the {+php-extension+}
3535

36-
The {+odm-short+} requires the {+php-extension+} to manage MongoDB
36+
{+odm-short+} requires the {+php-extension+} to manage MongoDB
3737
connections and commands.
3838
Follow the `Installing the MongoDB PHP Driver with PECL <https://www.php.net/manual/en/mongodb.installation.pecl.php>`__
39-
guide to install {+php-extension+}.
39+
guide to install the {+php-extension+}.
4040

4141
.. step:: Install Laravel
4242

4343
Ensure that the version of Laravel you install is compatible with the
44-
version of {+odm-short+}.
44+
version of {+odm-short+}. To learn which versions are compatible,
45+
see the :ref:`laravel-compatibility` page.
4546

46-
47-
Then run the following command to install
48-
Laravel.
47+
Run the following command to install Laravel:
4948

5049
.. code-block:: bash
5150

@@ -61,29 +60,37 @@ to a Laravel web application.
6160

6261
.. step:: Create a Laravel Application
6362

64-
Run the following command to generate a new Laravel web application
65-
called ``{+quickstart-app-name+}``:
63+
Run the following command to generate a new Laravel web application
64+
called ``{+quickstart-app-name+}``:
65+
66+
.. code-block:: bash
67+
68+
laravel new {+quickstart-app-name+}
69+
70+
When the installation completes, you should see the
71+
following output:
72+
73+
.. code-block:: none
74+
:copyable: false
6675

67-
.. code-block:: bash
76+
INFO Application ready in [{+quickstart-app-name+}]. You can start your local development using:
6877

69-
laravel new {+quickstart-app-name+}
78+
➜ cd {+quickstart-app-name+}
79+
➜ php artisan serve
7080

71-
When the installation completes, you should see the
72-
following output:
81+
New to Laravel? Check out our bootcamp and documentation. Build something amazing!
7382

74-
.. code-block:: none
75-
:copyable: false
83+
.. step:: Add a Laravel Application Encryption Key
7684

77-
INFO Application ready in [{+quickstart-app-name+}]. You can start your local development using:
85+
Run the following command to add the Laravel application encryption
86+
key which is required to encrypt cookies:
7887

79-
➜ cd {+quickstart-app-name+}
80-
➜ php artisan serve
88+
.. code-block:: bash
8189

82-
New to Laravel? Check out our bootcamp and documentation. Build something amazing!
90+
php artisan key:generate
8391

8492
.. step:: Add {+odm-short+} to the Dependencies
8593

86-
8794
Navigate to the application directory you created in the previous step:
8895

8996
.. code-block:: bash

docs/quick-start/next-steps.txt

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,12 @@ Next Steps
1111
.. meta::
1212
:keywords: learn more
1313

14-
Congratulations on completing the quick start tutorial!
14+
Congratulations on completing the Quick Start tutorial!
1515

1616
After you complete these steps, you have a Laravel web application that
1717
uses the {+odm-long+} to connect to your MongoDB deployment, run a query on
1818
the sample data, and render a retrieved result.
1919

20-
In this tutorial, you created a Laravel web application that uses the
21-
{+odm-long+} to connect to your MongoDB deployment, render the result
22-
of a query, and write data to a MongoDB deployment hosted on
23-
MongoDB Atlas.
24-
2520
You can download the web application project by cloning the
2621
`laravel-quickstart <https://github.com/mongodb-university/laravel-quickstart>`__
2722
GitHub repository.

docs/quick-start/view-data.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,11 @@ View Sample MongoDB Data
1414
.. procedure::
1515
:style: connected
1616

17-
.. step:: Create a Sample Model and Controller
17+
.. step:: Create a Model and Controller
1818

1919
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:
20+
``movies`` collection in your MongoDB database and the corresponding
21+
resource controller by running the following command:
2322

2423
.. code-block:: bash
2524

@@ -110,9 +109,10 @@ View Sample MongoDB Data
110109
INFO View [resources/views/browse_movie.blade.php] created successfully.
111110

112111
Open the ``browse_movie.blade.php`` view file in the ``resources/views``
113-
directory. Replace the contents with the following code:
112+
directory. Replace the contents with the following code and save the
113+
changes:
114114

115-
.. code-block:: bash
115+
.. code-block:: html
116116

117117
<!DOCTYPE html>
118118
<html>

docs/quick-start/write-data.txt

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ Post an API Request to Write Data
1414
.. procedure::
1515
:style: connected
1616

17-
.. step:: Create the Function to Store Data
17+
.. step:: Create the Function to Insert Data
1818

19-
Add logic to save the data from a request in the ``MovieController.php``
20-
file in the ``app/Http/Controllers/`` directory. Replace the existing
21-
placeholder ``store()`` method with the following code:
19+
Update the ``store()`` method ``MovieController.php``, located in
20+
the ``app/Http/Controllers`` directory to insert request data
21+
into the database as shown in the following code:
2222

2323
.. code-block:: php
2424

@@ -32,8 +32,8 @@ Post an API Request to Write Data
3232

3333
.. step:: Add a Route for the Controller Function
3434

35-
Add the API route to map to the ``store()`` method in the
36-
``routes/api.php`` file.
35+
Add the following API route to map to the ``store()`` method and the
36+
corresponding import in the ``routes/api.php`` file:
3737

3838
.. code-block:: php
3939

@@ -46,11 +46,10 @@ Post an API Request to Write Data
4646
]);
4747

4848

49-
.. step:: Update the Movie Model
49+
.. step:: Update the Model Fields
5050

51-
Add the movie detail fields to the ``$fillable`` array
52-
of the ``Movie`` model. After adding them, the ``Movie``
53-
class at ``app/Models/Movie.php`` should contain the
51+
Update the ``Movie`` model in the ``app/Models`` directory to
52+
specify fields that the ``fill()`` method populates as shown in the
5453
following code:
5554

5655
.. code-block:: php
@@ -87,8 +86,8 @@ Post an API Request to Write Data
8786

8887
.. step:: View the Data
8988

90-
Open ``http://127.0.0.1:8000/browse_movies`` in your web browser to view
91-
the movie information that you submitted. It should appear at the top of
89+
Open ``http://127.0.0.1:8000/browse_movies`` in your web browser to view
90+
the movie information that you submitted. It should appear at the top of
9291
the results.
9392

9493
.. include:: /includes/quick-start/troubleshoot.rst

0 commit comments

Comments
 (0)