Is there a reason the built in 'remember me' functionality doesn't work?
Well, I assumed it was working as intended - ie, when the PHP session times out, instead of presenting you with the login screen, it uses the remember_token to keep you logged in, albeit under a new session. I thought that it would be expected that session vars set in the first session would be lost in subsequent sessions. Is this not the case?
Docs on the remember functionality seem pretty thin. Has this been covered in detail elsewhere?
I am not sure about the longevity of session vars. I only use them for 1-2 page loads before expiring them.
The best way to find out if they stay persistent would be to check the code for the remember me functionality. Most likely in here somewhere, https://github.com/laravel/framework/tree/4.2/src/Illuminate/Session.
Sorry I don't have a more definitive answer, I've never tried to use states to remember information for more than a few minutes.
Thanks for the response. To be completely honest, I could easily refactor to use the cache as opposed to session. Given that I'm actually looking for this semi-temporary data to stored across sessions, that's probably the best way to do it!
Thanks
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community