Relation of relation Laravel

PHOTO EMBED

Fri Jun 11 2021 20:56:52 GMT+0000 (UTC)

Saved by @jeromew #php #laravel

//Multiple relationships:
$books = Book::with('author', 'publisher')->get();

//Nested relationships:
$books = Book::with('author.contacts')->get();
content_copyCOPY