/** * Lists all Cellars models. * @return mixed */ public function actionIndex() { $searchModel = new CellarsSearch(); $dataProvider = $searchModel->search(Yii::$app->request->queryParams); $pager = new \yii\data\Pagination(['pageSize' => 20]); $dataProvider->setPagination($pager); return $this->render('index', ['searchModel' => $searchModel, 'dataProvider' => $dataProvider]); }
/** * Lists all Cellars models. * @return mixed */ public function actionIndex() { $searchModel = new CellarsSearch(); $dataProvider = $searchModel->search(Yii::$app->request->getQueryParams()); return $this->render('index', ['dataProvider' => $dataProvider, 'searchModel' => $searchModel]); }