-
Notifications
You must be signed in to change notification settings - Fork 24.4k
Change redirect when authenticated #3564
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
The route /home doesn’t exist in a default Laravel application, whereas / does.
If you check the docs, you can put this in the AuthController:
that will change the location after a successful login (The default being
|
👍 for @martinbean. |
@surfer190 I know this, but in a new, clean Laravel installation, the route /home doesn’t exist, therefore it doesn’t make sense to redirect there if authenticated. |
💯 for @martinbean |
👍 I do that every time I begin a new project. |
👍 |
Yes but that is the point...you need to create the
|
It's a built in penalty (I would call it a feature honestly) for not RTFM at: http://laravel.com/docs/5.1/authentication#included-authenticating When you forget on a new project it's really easy to identify the issue because you get immediate, obvious feedback. If you are new to Laravel, the docs or a very simple Google search of 'laravel redirect home on login' will straighten you out quickly. The suggested change wouldn't provide any immediate feedback which would actually be more confusing. Additionally, some will want the redirect to / others will want something else. Most, if not all, will not route to /home on login. |
Change redirect when authenticated
🎉 |
The route /home doesn’t exist in a default Laravel application, whereas / does.