Answer the question
In order to leave comments, you need to log in
How to pass $query date to provider?
I pass the date to the provider the Query object as it is written in the documentation, it says to me that the type requires an instance of the Query class, but how do I pass the class instance if, after creating the Query object, I create an array from the result of the sql query?
$query = (new Query())
->select($columns)
->from([BaseMaterial::tableName(), $table_name])
->all();
$dataProvider = new ActiveDataProvider([
'query' => $query
]);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question