lundi 31 août 2015

I'm confusing in applying many to many relationship in Laravel 5

I'm making library system by using Laravel 5.1 but i'm confusing in applying the many to many relationship by Laravel between three table ( books , authors , books_authors_relationship ) if i want to make page ( author.blade.php) to display information of author and what is all books that is published by this authors and the link of this page take parameter id for author to display information of this author when click on the book author name at book page .

I have controller for book and for author , also i have model for book and for author but i don't know how i can make relation between page of book to take author id of clicked book and passing to author page ( author/1) to display information of this author through controller by using Eloquent Model !

Can you help me !




Aucun commentaire:

Enregistrer un commentaire