@@ -32,7 +32,7 @@ related model by using the same syntax as you use to access a property on the
3232model.
3333
3434The following sections describe the Laravel Eloquent and MongoDB-specific
35- relationships available in {+odm-short+} and shows examples of how to define
35+ relationships available in {+odm-short+} and show examples of how to define
3636and use them:
3737
3838- :ref:`One to one relationship <laravel-eloquent-relationship-one-to-one>`,
@@ -141,9 +141,9 @@ the parent and one or more related child model records.
141141
142142When you add a one to many relationship method, Eloquent lets you access the
143143model by using a dynamic property and stores the parent model's document ID
144- on each of the child model documents .
144+ on each child model document .
145145
146- In {+odm-short+}, you can define a one to many relationship by using the
146+ In {+odm-short+}, you can define a one to many relationship by adding the
147147``hasMany()`` method on the parent class and, optionally, the ``belongsTo()``
148148method on the child class.
149149
@@ -240,7 +240,7 @@ In {+odm-short+}, you can define a many to many relationship by adding the
240240When you define a many to many relationship in a relational database, Laravel
241241creates a pivot table to track the relationships. When you use {+odm-short+},
242242it omits the pivot table creation and adds the related document IDs to a
243- document field, derived from the related model class name.
243+ document field derived from the related model class name.
244244
245245.. tip::
246246
@@ -259,7 +259,7 @@ Many to Many Example
259259~~~~~~~~~~~~~~~~~~~~
260260
261261The following example class shows how to define a ``BelongsToMany`` many to
262- many relationship between a ``Planet`` and ``SpaceExporer `` model by using
262+ many relationship between a ``Planet`` and ``SpaceExplorer `` model by using
263263the ``belongsToMany()`` method:
264264
265265.. literalinclude:: /includes/eloquent-models/relationships/many-to-many/Planet.php
@@ -365,8 +365,8 @@ to meet one or more of the following requirements:
365365 data
366366- Reducing the number of reads required to fetch the data
367367
368- In {+odm-short+}, you can define embedded documents by using one of the
369- following dynamic property methods:
368+ In {+odm-short+}, you can define embedded documents by adding one of the
369+ following methods:
370370
371371- ``embedsOne()`` to embed a single document
372372- ``embedsMany()`` to embed multiple documents
@@ -388,8 +388,9 @@ pattern.
388388Embedded Document Example
389389~~~~~~~~~~~~~~~~~~~~~~~~~
390390
391- The following example class shows how to define an ``embedsMany`` one to many
392- relationship between a ``SpaceShip`` and ``Cargo`` model:
391+ The following example class shows how to define an ``EmbedsMany`` one to many
392+ relationship between a ``SpaceShip`` and ``Cargo`` model by using the
393+ ``embedsMany()`` method:
393394
394395.. literalinclude:: /includes/eloquent-models/relationships/embeds/SpaceShip.php
395396 :language: php
@@ -446,7 +447,7 @@ Cross-Database Relationships
446447----------------------------
447448
448449A cross-database relationship in {+odm-short+} is a relationship between models
449- stored in a SQL relational database and models stored in a MongoDB database.
450+ stored in a relational database and models stored in a MongoDB database.
450451
451452When you add a cross-database relationship, Eloquent lets you access the
452453related models by using a dynamic property.
@@ -485,7 +486,7 @@ model by using the ``belongsTo()`` method:
485486
486487.. tip::
487488
488- Make sure that your primary key defined in your relational database table
489+ Make sure that the primary key defined in your relational database table
489490 schema matches the one that your model uses. To learn more about Laravel
490491 primary keys and schema definitions, see the following pages in the Laravel
491492 documentation:
@@ -494,8 +495,8 @@ model by using the ``belongsTo()`` method:
494495 - `Database: Migrations <https://laravel.com/docs/{+laravel-docs-version+}/migrations>`__
495496
496497The following sample code shows how to create a ``SpaceShip`` model in
497- a MySQL database and related ``Passenger`` models in a MongoDB database and
498- the data created by running the code. Click the :guilabel:`VIEW OUTPUT` button
498+ a MySQL database and related ``Passenger`` models in a MongoDB database as well
499+ as the data created by running the code. Click the :guilabel:`VIEW OUTPUT` button
499500to see the data created by running the code:
500501
501502.. io-code-block::
0 commit comments