Skip to content

Commit 389c76a

Browse files
author
Chris Cho
committed
fixes
1 parent 6d0ba9b commit 389c76a

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

docs/eloquent-models/relationships.txt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,10 @@ as shown in the following example class:
8585

8686
The following sample code shows how you can instantiate a model for each class
8787
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:
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
157158
The following example class shows how to define a ``HasMany`` one to many
158159
relationship 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

164165
To define the inverse of the relationship on ``Moon``, add the dynamic
165166
property and call the ``belongsTo()`` method on it as shown in the following
166167
example class:
167168

168-
.. literalinclude:: includes/eloquent-models/relationships/MoonOneToMany.php
169+
.. literalinclude:: /includes/eloquent-models/relationships/MoonOneToMany.php
169170
:language: php
170171
:dedent:
171172

0 commit comments

Comments
 (0)