public function actionIndex() { $filterModel = new Book(); if (Yii::$app->request->get('Book')) { $filterModel->load(Yii::$app->request->get()); } $getArray = Yii::$app->request->get(); $getArray['Book'] = $filterModel->getArrayForLink(); $this->_registerJs(); return $this->render('index', ['dataProvider' => $filterModel->search(), 'filterModel' => $filterModel, 'authors' => Author::find()->all(), 'getArray' => $getArray]); }