S
S
Sergey Beloventsev2018-05-01 13:33:11
Yii
Sergey Beloventsev, 2018-05-01 13:33:11

Question how to use listView for linked model?

There is a Categories model to it there is a Book connection hasmany connection through the book_catagory table (the model is formed)
this is how I get the category

$catagory = Category::find()->where(['id'=>$id])->wish('book')->one();

The question is how do I form a dataprovider for the book connection in order to use it later in the listview
Or are there any recipes?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question