@@ -14,7 +14,7 @@ View MongoDB Data
14
14
.. procedure::
15
15
:style: connected
16
16
17
- .. step:: Create a Model and Controller
17
+ .. step:: Create a model and controller
18
18
19
19
Create a model called ``Movie`` to represent data from the sample
20
20
``movies`` collection in your MongoDB database and the corresponding
@@ -33,7 +33,7 @@ View MongoDB Data
33
33
34
34
INFO Controller [app/Http/Controllers/MovieController.php] created successfully.
35
35
36
- .. step:: Edit the Model to use {+odm-short+}
36
+ .. step:: Edit the model to use {+odm-short+}
37
37
38
38
Open the ``Movie.php`` model in your ``app/Models`` directory and
39
39
make the following edits:
@@ -56,7 +56,7 @@ View MongoDB Data
56
56
protected $connection = 'mongodb';
57
57
}
58
58
59
- .. step:: Add a Controller Function
59
+ .. step:: Add a controller function
60
60
61
61
Open the ``MovieController.php`` file in your ``app/Http/Controllers``
62
62
directory. Replace the ``show()`` function with the
@@ -76,7 +76,7 @@ View MongoDB Data
76
76
]);
77
77
}
78
78
79
- .. step:: Add a Web Route
79
+ .. step:: Add a web route
80
80
81
81
Open the ``web.php`` file in the ``routes`` directory.
82
82
Add an import for the ``MovieController`` and a route called
@@ -91,7 +91,7 @@ View MongoDB Data
91
91
92
92
Route::get('/browse_movies/', [MovieController::class, 'show']);
93
93
94
- .. step:: Generate a View
94
+ .. step:: Generate a view
95
95
96
96
Run the following command from the application root directory
97
97
to create a view that displays movie data:
@@ -137,7 +137,7 @@ View MongoDB Data
137
137
</body>
138
138
</html>
139
139
140
- .. step:: Start your Laravel Application
140
+ .. step:: Start your Laravel application
141
141
142
142
Run the following command from the application root directory
143
143
to start your PHP built-in web server:
@@ -155,7 +155,7 @@ View MongoDB Data
155
155
156
156
Press Ctrl+C to stop the server
157
157
158
- .. step:: View the Movie Data
158
+ .. step:: View the movie data
159
159
160
160
Open the URL http://127.0.0.1:8000/browse_movies in your web browser.
161
161
The page shows a list of movies and details about each of them.
0 commit comments