I have created session in laravel , but its getting destroyed after long time. I kept a user logged in , didn't shutdown the system but the next day or two the session gets destroyed , when accessing the user profile page its gives error.
Have used the following to save the session :
$session = new Session();
$session->user_id = $user->id;
$session->token = $site_login;
// save in database
$session->save();
return redirect('/home')->withCookie(cookie()->forever('site_login', $site_login));