/** * Lists all Cliente models. * @return mixed */ public function actionIndex() { $searchModel = new ClienteSearch(); if (Yii::$app->user->identity->username == "admin") { $dataProvider = $searchModel->search(Yii::$app->request->queryParams); } else { $dataProvider = $searchModel->search2(Yii::$app->request->queryParams); } return $this->render('index', ['searchModel' => $searchModel, 'dataProvider' => $dataProvider]); }
/** * Lists all Cliente models. * @return mixed */ public function actionIndex() { $searchModel = new ClienteSearch(); $dataProvider = $searchModel->search(Yii::$app->request->queryParams); return $this->render('index', ['searchModel' => $searchModel, 'dataProvider' => $dataProvider]); }