I am looking for some about how to implement the following thing with yii2:
Lets imagine we have the following structure:
authors table.
Books table
Each author -> has written 1 or more books.
What I want to do is to display on a view, the details of an author, and under it, a gridview of all the books it has done, and the control buttons to create/ remove new books for that current author…
How I should retrieve the data of the books? From the same controller for Authors?
I have already implemented the table relations between authors and books, in the Author’s model
Another way is to show all authors in your grid and link each author to page such as ?r=author/books&id=42 to show all books from author ID 42 (another grid).