/** * Displays homepage. * * @return mixed */ public function actionIndex() { $model = new JobSearch(); if ($model->load(Yii::$app->getRequest()->post())) { return $this->render('index', ['model' => $model, 'result' => $model->searchJobsIndex()]); } return $this->render('index', ['model' => $model]); }
/** * Lists all Job models. * @return mixed */ public function actionIndex() { $searchModel = new JobSearch(); $dataProvider = $searchModel->search(Yii::$app->request->queryParams); return $this->render('index', ['searchModel' => $searchModel, 'dataProvider' => $dataProvider]); }