You can either set a cookie or a session for that ;) You can create a new session for your use of course, so you don't lose the remember me option ;)
Apr 6, 2015
4
Level 1
Setting an attribute to a model to be saved across session
I need to set an attribute to my user that is not stored on the database and that need to be saved from the start of the session to the log out.
What I mean is that I would set the attribute "test" to my User model, and I could still access this attribute with the same value as when I set it on another page.
Should I just put this attribute into my session or is there a better way to do this? The thing is that I also use the "remember me" option and I can't afford to lose that attribute.
Thank you.
Please or to participate in this conversation.