/**
  * Lists all Shop models.
  * @return mixed
  */
 public function actionIndex()
 {
     if (Yii::$app->user->identity->role == 10) {
         $this->layout = '/adminka-admin';
     } else {
         $this->layout = '/adminka-user';
     }
     $searchModel = new GoodsSearch();
     $dataProvider = $searchModel->search(['user_id' => Yii::$app->user->id]);
     return $this->render('index', ['searchModel' => $searchModel, 'dataProvider' => $dataProvider]);
 }
Example #2
0
 /**
  * Lists all Goods models.
  * @return mixed
  */
 public function actionIndex()
 {
     $searchModel = new GoodsSearch();
     $dataProvider = $searchModel->search(Yii::$app->request->queryParams);
     return $this->render('index', ['searchModel' => $searchModel, 'dataProvider' => $dataProvider]);
 }