Hi,
I have this coded in my controller:
public function actionIndex()
{
$query = Clients::find()
->where(['company_id' => '1'])
->all();
$dataProvider = new ActiveDataProvider([
'query' => $query,
]);
return $this->render('index', [
'dataProvider' => $dataProvider,
]);
}
It does not work, error:
The "query" property must be an instance of a class that implements the QueryInterface e.g. yii\db\Query or its subclasses.