Recently, I noticed a very disturbing situation with my laravel 5 application, which I cannot understand. During login, I set the user_type variable in the session as follows
Session::put('is_supervisor', $user->is_supervisor);
In my config / session.php file, I have the following configuration:
'lifetime' => 120,
'expire_on_close' => false,
I also implemented the "remember me" function.
I registered as a supervisor user when I remember how I checked. After a few hours, I will close the browser without logging out and not starting it again, logging into the user profile as expected, as it expire_on_closewas set to false, and remember that I was checked. But I noticed that the is_supervisor variable no longer existed in the session, so I had to log out again and log back in to return the variable to the session. What could be the problem? I use the file as my session driver.
source
share