class LoginController extends Controller {
protected $redirectTo = '/home';
}
Sep 2, 2017
2
Level 1
Redirect to home and not to last page when session timeout
Hi, I have an application where authentication is mandatory for all web pages. When session expires, my app returns to login. After login, it opens the last opened page, but I want it to open always the home page, since users might change their role after login and a page may not be accessible with default privileges.
The question is: how and where may I set a Laravel app to redirect always to the home page?
I see that the RedirectIfAuthenticated middleware and the LoginController, on authentication, redirect to home. Yet, after timeout these instructions are ignored.
Any clue?
Please or to participate in this conversation.