Hi, I am new to laravel and I have a question about authentication. I have the following function in the authentication controller:
public function signout()
{
$l = Login::where('user_id', Session::get('user')->user_id)
->where('logged_in', 1)->first();
$l->logged_in = 0;
if ($l->save())
{
Auth::logout();
Session::forget('user');
return Redirect::to('/account/signin');
}
}
Now, in my session configuration, I have established that the sessions expire after 60 minutes, after which the user will obviously be logged out. However, this will happen without performing my other functions, such as setting the user registered in status to zero in the database or forgetting the array of user sessions. Is there a way I can run these functions to execute after the login session ends? Thank you in advance.
: , , , , , , "", , , , laravel , Session Session expired, , .