/** * Lists all Book models. * @return mixed */ public function actionIndex() { Url::remember(); $searchModel = new BookSearch(); $dataProvider = $searchModel->search(Yii::$app->request->queryParams); return $this->render('index', ['searchModel' => $searchModel, 'dataProvider' => $dataProvider]); }
/** * Lists all Book models. * @return mixed */ public function actionIndex() { $params = Yii::$app->request->queryParams; $params = Utils::rememberSearchModel($params, 'BookSearch'); $searchModel = new BookSearch(); $dataProvider = $searchModel->search($params); $authors = $this->getAuthors(); return $this->render('index', ['dataProvider' => $dataProvider, 'searchModel' => $searchModel, 'authors' => $authors]); }