public function actionRegistration() { $this->layout = '@app/views/layouts/registration'; if (!\Yii::$app->user->isGuest) { return $this->goHome(); } $model = new LoginForm(); if ($model->load(Yii::$app->request->post()) && $model->login()) { ActionHelper::redirecToHome(); return $this->goBack(); } else { return $this->render('registration', ['model' => $model]); } }
public function actionIndex() { //die('fff'); ActionHelper::redirecToHome(); return $this->render('index'); }