Код: Выделить всё
public function getMenupoints() {
return $this->hasMany(Menupoint::class, ['par' => 'id_menupoint']);
}
Код: Выделить всё
$dataProvider = new ActiveDataProvider([
'query' => $model->menupoints,
'pagination' => [
'pageSize' => 20,
],
]);
The "query" property must be an instance of a class that implements the QueryInterface e.g. yii\db\Query or its subclasses.
Пришлось менять на
Код: Выделить всё
$dataProvider = new ActiveDataProvider([
'query' => Menupoint::find()->where(['par' => $id]),
'pagination' => [
'pageSize' => 20,
],
]);