Skip to content

Commit 81ae6b9

Browse files
committed
Update readme #744, fixes ##746
1 parent d6e625e commit 81ae6b9

File tree

1 file changed

+1
-19
lines changed

1 file changed

+1
-19
lines changed

README.md

+1-19
Original file line numberDiff line numberDiff line change
@@ -706,25 +706,7 @@ Like other relations, embedsMany assumes the local key of the relationship based
706706
return $this->embedsMany('Book', 'local_key');
707707
```
708708

709-
Embedded relations will return a Collection of embedded items instead of a query builder. To allow a more query-like behavior, a modified version of the Collection class is used, with support for the following **additional** operations:
710-
711-
- where($key, $operator, $value)
712-
- whereIn($key, $values) and whereNotIn($key, $values)
713-
- whereBetween($key, $values) and whereNotBetween($key, $values)
714-
- whereNull($key) and whereNotNull($key)
715-
- orderBy($key, $direction)
716-
- oldest() and latest()
717-
- limit($value)
718-
- offset($value)
719-
- skip($value)
720-
721-
This allows you to execute simple queries on the collection results:
722-
723-
```php
724-
$books = $user->books()->where('rating', '>', 5)->orderBy('title')->get();
725-
```
726-
727-
**Note:** Because embedded models are not stored in a separate collection, you can not query all of embedded models. You will always have to access them through the parent model.
709+
Embedded relations will return a Collection of embedded items instead of a query builder. Check out the available operations here: https://laravel.com/docs/master/collections
728710

729711
### EmbedsOne Relations
730712

0 commit comments

Comments
 (0)