Answer the question
In order to leave comments, you need to log in
Is there a detailed example on Yii2 GridView - with data from related tables?
There are three models:
people-id , name
hobby-id, name, about
hobby-people id-people, id-hobbie
many-to-many relationship. you need to display the contents of people-hobbies in the grid, and so that the names are displayed and the names of the hobby and descriptions of the hobby.
you also need to filter by all fields and search by all too.
I dug up a bunch of examples, but either not for Yii2, or about how to recolor the header in the grid or not detailed - some of the necessary actions are simply not mentioned. Absolutely nothing to grab on to. I have a general idea of Yii. I wrote simple projects on the 1st, but with this task a complete pipe ((((. The documentation is wildly extensive and does not give specific answers. I can peep some things there, but in general the picture does not add up.
In general, I will be grateful for any advice and links. Possibly in English.
Thank you.
Answer the question
In order to leave comments, you need to log in
All about GridView Tyk
All about related data Tyk For links, see the middle of the article. Note the use of a linked table and the variability of eager loads. In order not to produce 100 requests.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question