I may be doing this the wrong way, or there may be a better way to do it..
Upon login I'm setting some session data:
session(['api_token' => $user->api_token]);
session(['season' => Season::find($request->season)]);
session(['centres' => Centre::where('active', 1)->get()]);
I call it like so...
session('season')->name
.env file:
SESSION_LIFETIME=9999999999
This works great for a while, but if there's a period of a few hours of activity (I haven't timed it exactly), then the session data I've set gets lost, I have to log out then back in to set the session data again.
However, the user still remains logged in, I can pull Auth data perfectly fine.
What is going on here?
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire