File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -85,9 +85,10 @@ as shown in the following example class:
85
85
86
86
The following sample code shows how you can instantiate a model for each class
87
87
and add the relationship between them. Click the :guilabel:`Output` button to
88
- see sample MongoDB documents created by running the code::
88
+ see sample MongoDB documents created by running the code:
89
89
90
90
.. io-code-block::
91
+
91
92
.. input:: /includes/eloquent-models/relationships/RelationshipController.php
92
93
:language: php
93
94
:dedent:
@@ -157,15 +158,15 @@ One to Many Example
157
158
The following example class shows how to define a ``HasMany`` one to many
158
159
relationship between a ``Planet`` parent model and ``Moon`` child model.
159
160
160
- .. literalinclude:: includes/eloquent-models/relationships/PlanetOneToMany.php
161
+ .. literalinclude:: / includes/eloquent-models/relationships/PlanetOneToMany.php
161
162
:language: php
162
163
:dedent:
163
164
164
165
To define the inverse of the relationship on ``Moon``, add the dynamic
165
166
property and call the ``belongsTo()`` method on it as shown in the following
166
167
example class:
167
168
168
- .. literalinclude:: includes/eloquent-models/relationships/MoonOneToMany.php
169
+ .. literalinclude:: / includes/eloquent-models/relationships/MoonOneToMany.php
169
170
:language: php
170
171
:dedent:
171
172
You can’t perform that action at this time.
0 commit comments