public function actionEmail() { if (!Yii::$app->user->can("admin")) { throw new NotFoundHttpException('The requested page does not exist.'); } $this->layout = "admin"; $searchModel = new TbEmailSearch(); $dataProvider = $searchModel->search(Yii::$app->request->queryParams); return $this->render('email_index', ['searchModel' => $searchModel, 'dataProvider' => $dataProvider]); }
/** * Lists all TbEmail models. * @return mixed */ public function actionIndex() { $searchModel = new TbEmailSearch(); $dataProvider = $searchModel->search(Yii::$app->request->queryParams); return $this->render('index', ['searchModel' => $searchModel, 'dataProvider' => $dataProvider]); }