Exemplo n.º 1
0
 /**
  * Lists all Apartment models.
  * @return mixed
  */
 public function actionIndex()
 {
     $searchModel = new ApartmentSearch();
     $r = Yii::$app->request->queryParams;
     $r['view'] = in_array(isset($r['view']), ['table', 'grid']) ? $r['view'] : 'table';
     $dataProvider = $searchModel->search($r);
     return $this->render('index', ['searchModel' => $searchModel, 'dataProvider' => $dataProvider, 'queries' => QuerySearch::takeAll(), 'view' => $r['view']]);
 }
Exemplo n.º 2
0
 /**
  * Lists all Query models.
  * @return mixed
  */
 public function actionIndex()
 {
     $searchModel = new QuerySearch();
     $dataProvider = $searchModel->search(Yii::$app->request->queryParams);
     return $this->render('index', ['searchModel' => $searchModel, 'dataProvider' => $dataProvider]);
 }