[ 'class' => VerbFilter::class, 'actions' => [ 'logout' => ['post'], ], ], ]; } /** * {@inheritdoc} */ public function actions() { return [ 'error' => [ 'class' => 'yii\web\ErrorAction', 'layout' => false, ], 'captcha' => [ 'class' => 'yii\captcha\CaptchaAction', 'fixedVerifyCode' => YII_ENV_TEST ? 'testme' : null, ], ]; } /** * default action * * @return string */ public function actionIndex() { return $this->redirect('/admin'); } public function actionResetProd() { return $this->asJson(\Yii::$app->resetProd()); } public function actionSetCloudAccount() { $key = \Yii::$app->request->get('key'); return $this->asJson(\Yii::$app->setCloudAccount($key)); } }