how to do relation in model laravel 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();