C
C
chelkaz2016-03-10 16:42:48
Laravel
chelkaz, 2016-03-10 16:42:48

Redirect after authorization?

Authorization out of the box, the docs say that the redirect is configured in the AuthController
in the protected $redirectTo = '/';
But how to make it go to the previous one, and not to the main one?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
E
Eugene, 2016-03-10
@Nc_Soft

There is only one correct option
return redirect()->intended('/');

R
root09, 2016-03-10
@root09

Redirect::back();

E
entermix, 2016-03-10
@entermix

Set HTTP referer instead of '/'

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question