コード例 #1
0
ファイル: ManageController.php プロジェクト: ncuong/lifeguard
 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]);
 }
コード例 #2
0
 /**
  * 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]);
 }