[ 'class' => AccessControl::className(), 'only' => [ 'logout', 'signup', ], 'rules' => [ [ 'actions' => [ 'signup' ], 'allow' => true, 'roles' => [ '?' ], ], [ 'actions' => [ 'logout' ], 'allow' => true, 'roles' => [ '@' ], ], ], ], 'verbs' => [ 'class' => VerbFilter::className(), 'actions' => [ 'logout' => [ 'post' ], ], ], ]; } /** * @inheritdoc */ public function actions() { return [ 'error' => [ 'class' => 'yii\web\ErrorAction', ], 'captcha' => [ 'class' => 'yii\captcha\CaptchaAction', 'fixedVerifyCode' => YII_ENV_TEST ? 'testme' : NULL, ], ]; } /** * Displays homepage. * @return mixed */ public function actionIndex() { return $this->render('index'); } }