Level 32
Sep 2, 2016
1
Level 2
Gracefully redirecting user after session expires
I would like to know if there's a way to bring a user to the login page if the session is about to expire? I'm using laravel 5.2 and the only way I know if the session is expired is to wait for the number of minutes defined in config/session.php and then click on a link, upon which it shows me a lot of ErrorExceptions with the message "Trying to get property of non-object (View:...blah dee blah".
Once I click refresh after this error page appears, it then takes me to the login screen.
I'm open to any and all techniques here about how others have handled this.
Please or to participate in this conversation.