My app is built with Laravel 5.1. I have saved some data in session using the code, session(['first_name' => Auth::user()->first_name])
. The value is set when user is logging in. It's working most of the times but sometimes the session value is being null. I don't know why automatically the session value is getting null. I am tired of solving this kind of weird problem. I need help.
Edited: Also the issue is more serious when user is not logged in with remember token active, the Auth::user() is also getting null for that user. And these situations are happening sometimes, not always. Don't know whether it is server problem or not.