Beispiel #1
0
 /**
  * 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]);
 }
Beispiel #2
0
 /**
  * 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]);
 }