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:
8585
8686The following sample code shows how you can instantiate a model for each class
8787and 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:
8989
9090.. io-code-block::
91+
9192 .. input:: /includes/eloquent-models/relationships/RelationshipController.php
9293 :language: php
9394 :dedent:
@@ -157,15 +158,15 @@ One to Many Example
157158The following example class shows how to define a ``HasMany`` one to many
158159relationship between a ``Planet`` parent model and ``Moon`` child model.
159160
160- .. literalinclude:: includes/eloquent-models/relationships/PlanetOneToMany.php
161+ .. literalinclude:: / includes/eloquent-models/relationships/PlanetOneToMany.php
161162 :language: php
162163 :dedent:
163164
164165To define the inverse of the relationship on ``Moon``, add the dynamic
165166property and call the ``belongsTo()`` method on it as shown in the following
166167example class:
167168
168- .. literalinclude:: includes/eloquent-models/relationships/MoonOneToMany.php
169+ .. literalinclude:: / includes/eloquent-models/relationships/MoonOneToMany.php
169170 :language: php
170171 :dedent:
171172
You can’t perform that action at this time.
0 commit comments