I have laravel application with multiple users. All of the users can login with different roles. For example, as a seller or Buyer. But when logged in as both and try to log out as a seller, then buyer automatically gets logged out. I think this is because of same logout function.
I tried to override this logout function but is doesn't work.
public function logout(Request $request)
{
$this->guard()->logout();
$request->session()->invalidate();
return $this->loggedOut($request) ?: redirect('/');
}
I want that only type of user should get log out.