/** * @return mixed Список всех книг */ public function actionIndex() { $model = new \app\models\Books(['scenario' => Books::SCENARIO_SEARCH]); $dataProvider = $model->search(Yii::$app->request->get()); return $this->render('index', ['dataProvider' => $dataProvider, 'authors' => $this->getAuthorsForDropDownList(['' => 'Все']), 'model' => $model]); }