Answer the question
In order to leave comments, you need to log in
What does this line and parameters search,queryParams mean?
$dataProvider = $searchModel->search(Yii::$app->request->queryParams);
Answer the question
In order to leave comments, you need to log in
The model has a method search
to which the request parameters are passed
Yii::$app->request->queryParams
$dataProvider
- variable =
- assignment operator $searchModel
- access to the object contained in the variable. Usually, based on the context, this is SomeMyModelSearch, which is inherited from SomeMyModel ->search
- we turn to the search method in someMyModelSearch Yii::$app->request->queryParams
- the parameters that came to the controller
This code is usually generated by standard GII to filter data through gridView, for actionIndex
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question