public function prepareDataProvider() { $searchModel = new ImageSearch(); return $searchModel->search(\Yii::$app->request->queryParams); }
/** * Lists all Image models. * @return mixed */ public function actionIndex() { $searchModel = new ImageSearch(); $dataProvider = $searchModel->search(Yii::$app->request->queryParams); return $this->render('index', ['searchModel' => $searchModel, 'dataProvider' => $dataProvider]); }