Raphael Rafatpanah
Raphael Rafatpanah

Reputation: 19977

How to redirect to a single URI after Laravel 5 Auth?

What would be the best way to redirect to one constant URI after a successful Laravel 5 Authentication instead of redirecting to the indended URI?

Upvotes: 2

Views: 221

Answers (2)

Imtiaz Pabel
Imtiaz Pabel

Reputation: 5443

Try use this:

return redirect()->intended('user');

Upvotes: 0

Colin Schoen
Colin Schoen

Reputation: 2592

Assuming you are authenticating inside of your own controller you can do something like

return Redirect::route('routealiashere');

or

return Redirect::url('path/to/route/here');

after verifying the credentials.

Upvotes: 5

Related Questions