/** * Lists all User models. * @return mixed */ public function actionIndex() { $searchModel = \Yii::createObject(UserSearch::className()); $dataProvider = $searchModel->search(['UserSearch' => Yii::$app->request->queryParams]); // prepare and return a data provider for the "index" action return $dataProvider; }
/** * Lists all User models. * @return mixed */ public function actionIndex() { $searchModel = \Yii::createObject(UserSearch::className()); $dataProvider = $searchModel->search($_GET); return $this->render('index', ['dataProvider' => $dataProvider, 'searchModel' => $searchModel]); }