@@ -168,7 +168,7 @@ Keep in mind guarding still works, but you may experience unexpected behavior.
168168Schema
169169------
170170
171- The database driver also has (limited) schema builder support. You can
171+ The database driver also has (limited) schema builder support. You can
172172conveniently manipulate collections and set indexes.
173173
174174Basic Usage
@@ -351,7 +351,7 @@ relation definition.
351351
352352.. code-block:: php
353353
354- $book = Book:: first();
354+ $book = User::first()->books()-> first();
355355
356356 $user = $book->user;
357357
@@ -455,7 +455,7 @@ Inserting and updating embedded models works similar to the ``hasOne`` relation:
455455 $book->author()
456456 ->create(['name' => 'John Doe']);
457457
458- You can update the embedded model using the ``save`` method (available since
458+ You can update the embedded model using the ``save`` method (available since
459459release 2.0.0):
460460
461461.. code-block:: php
@@ -476,13 +476,13 @@ You can replace the embedded model with a new model like this:
476476Cross-Database Relationships
477477----------------------------
478478
479- If you're using a hybrid MongoDB and SQL setup, you can define relationships
479+ If you're using a hybrid MongoDB and SQL setup, you can define relationships
480480across them.
481481
482- The model will automatically return a MongoDB-related or SQL-related relation
482+ The model will automatically return a MongoDB-related or SQL-related relation
483483based on the type of the related model.
484484
485- If you want this functionality to work both ways, your SQL-models will need
485+ If you want this functionality to work both ways, your SQL-models will need
486486to use the ``MongoDB\Laravel\Eloquent\HybridRelations`` trait.
487487
488488**This functionality only works for ``hasOne``, ``hasMany`` and ``belongsTo``.**
0 commit comments