/**
  * Lists all Books models.
  * @return mixed
  */
 public function actionIndex()
 {
     // we need to give the list of Authors to the view so we have to use Authors model
     $authors = new Authors();
     $searchModel = new BooksSearch();
     $dataProvider = $searchModel->search(Yii::$app->request->queryParams);
     return $this->render('index', ['searchModel' => $searchModel, 'dataProvider' => $dataProvider, 'authorsList' => $authors->getAuthorsFullnamesList()]);
 }
Ejemplo n.º 2
0
 /**
  * Displays index page.
  * @return mixed
  */
 public function actionIndex()
 {
     $searchModel = new BooksSearch();
     $dataProvider = $searchModel->search(\Yii::$app->request->queryParams);
     return $this->render('index', ['searchModel' => $searchModel, 'dataProvider' => $dataProvider]);
 }