@@ -14,30 +14,111 @@ Download and Install
1414Prerequisites
1515-------------
1616
17- This guide assumes that you have the following software installed:
17+ - This guide assumes that you have the following software installed:
1818
19- - `PHP <https://www.php.net/downloads>`__
20- - `Composer <https://getcomposer.org/>`__
19+ - `PHP <https://www.php.net/downloads>`__
20+ - `Composer <https://getcomposer.org/doc/00-intro.md >`__
2121
22- Complete the following steps to download and install the components you
23- need to create a Laravel web application and set up {+odm-short+}.
22+ - A terminal app and shell. For MacOS users, use Terminal or a similar app.
23+ For Windows users, use PowerShell.
24+
25+ Download and Install the Dependencies
26+ -------------------------------------
27+
28+ Complete the following steps to install and add the {+odm-short+} dependencies
29+ to a Laravel web application.
2430
2531.. procedure::
2632 :style: connected
2733
28- .. step:: Install the MongoDB PHP Driver
34+ .. step:: Install the {+php-extension}
35+
36+ The {+odm-short+} requires the {+php-extension+} to manage MongoDB
37+ connections and commands.
38+
39+
40+ Use the ``pecl`` extension manager to install {+php-extension+}.
41+
42+ .. code-block:: bash
43+
44+ pecl install mongodb
45+
46+ You can use select the default responses when prompted.
47+
48+ When the installation successfully completes, you should see the
49+ following output:
50+
51+ .. code-block:: none
52+
53+ install ok: channel://pecl.php.net/mongodb-<version number>
54+ Extension mongodb enabled in php.ini
2955
30- TODO
3156
3257 .. step:: Install Laravel
3358
34- TODO
59+ Ensure that the version of Laravel you install is compatible with the
60+ version of {+odm-short+}.
61+
62+ .. code-block:: bash
63+
64+ composer global require "laravel/installer"
65+
66+ When the installation successfully completes, you should see the
67+ following output:
68+
69+ .. code-block:: none
70+
71+ Using version ^<version number> for laravel/installer
72+
73+ .. step:: Create a Laravel App
74+
75+ Run the following command to generate a new Laravel web application
76+ called {+quickstart-app-name+}:
77+
78+ .. code-block:: bash
79+
80+ laravel new {+quickstart-app-name+}
81+
82+ When the installation successfully completes, you should see the
83+ following output:
84+
85+ .. code-block:: none
86+
87+ INFO Application ready in [{+quickstart-app-name+}]. You can start your local development using:
88+
89+ ➜ cd {+quickstart-app-name+}
90+ ➜ php artisan serve
91+
92+ New to Laravel? Check out our bootcamp and documentation. Build something amazing!
93+
94+ .. step:: Add {+odm-short+} to the Dependencies
95+
96+
97+ Navigate to the application directory you created in the previous step:
98+
99+ .. code-block:: bash
100+
101+ cd {+quickstart-app-name+}
102+
103+ Run the following command to add the {+odm-short+} dependency to
104+ your application:
105+
106+ .. code-block:: bash
107+
108+ composer require "mongodb/laravel-mongodb"
109+
110+ When the installation successfully completes, you should see the
111+ following in your ``composer.json`` file:
35112
36- .. step :: Add the {+odm-short+} Dependency
113+ .. code-block :: json
37114
38- TODO
115+ {
116+ "require": {
117+ "mongodb/laravel-mongodb": "^{+package-version+}"
118+ }
119+ }
39120
40121.. include:: /includes/quick-start/troubleshoot.rst
41122
42- .. button:: Create a Deployment
123+ .. button:: Create a MongoDB Deployment
43124 :uri: /quick-start/create-a-deployment/
0 commit comments