Exemplo n.º 1
0
 /**
  * Lists all BActions models.
  * @return mixed
  */
 public function actionIndex()
 {
     if (Yii::$app->user->isGuest) {
         $this->redirect(Yii::$app->user->loginUrl);
     }
     $dataProvider = new ActiveDataProvider(['query' => BActions::find(), 'sort' => ['defaultOrder' => ['id' => SORT_DESC]]]);
     return $this->render('index', ['dataProvider' => $dataProvider]);
 }
Exemplo n.º 2
0
 public function actionActions()
 {
     $actions = BActions::find()->all();
     return $this->render('actions', ['actions' => $actions]);
 }