laravel define relation in model code example
Example: laravel relation of relation
//Multiple relationships:
$books = Book::with('author', 'publisher')->get();
//Nested relationships:
$books = Book::with('author.contacts')->get();
//Multiple relationships:
$books = Book::with('author', 'publisher')->get();
//Nested relationships:
$books = Book::with('author.contacts')->get();