Exemplo n.º 1
0
 /**
  * Lists all Products models.
  * @return mixed
  */
 public function actionIndex()
 {
     $searchModel = new ProductsSearch();
     $dataProvider = $searchModel->search(Yii::$app->request->queryParams);
     $countries = Countries::find()->all();
     return $this->render('index', ['searchModel' => $searchModel, 'dataProvider' => $dataProvider, 'countries' => $countries]);
 }
Exemplo n.º 2
0
 /**
  * Lists all Products models.
  * @return mixed
  */
 public function actionIndex()
 {
     $searchModel = new ProductsSearch();
     $dataProvider = $searchModel->search(Yii::$app->request->queryParams);
     $countries = Countries::find()->all();
     $userId = Yii::$app->user->getId();
     $userModel = User::getById($userId);
     return $this->render('index', ['searchModel' => $searchModel, 'dataProvider' => $dataProvider, 'countries' => $countries, 'userModel' => $userModel]);
 }