Answer the question
In order to leave comments, you need to log in
How to return to YII2 address entered before authorization?
A person follows the link, but he is not authorized, he is redirected to the login form.
After he logs in, he should be redirected to the address he wanted to go to.
How to implement such a thing? I started looking at Url::remember(), but I still don't understand how it works
Url::remember('', 'saveUrl') swears, I don't understand why.
Answer the question
In order to leave comments, you need to log in
return $this->redirect(Yii::$app->request->referrer);
return $this->goBack();
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question