public function actionIndex() { $dataProvider = new Library(); $books = new Author(); return $this->render('index', ['dataProvider' => $dataProvider->relation(), 'books' => $books->getBooks('1')]); }