0

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.

party-ring
  • 1,761
  • 1
  • 16
  • 38
  • 1
    How do you seperate between seller and buyer? – Jerodev Jul 18 '19 at 11:19
  • I have different tables for buyers and sellers. And different controllers as well. –  Jul 18 '19 at 11:31
  • If you really want everything to be separate do it well by creating multiple guard and all that....tons of tutorials out there to help you out. My question is What do you mean by sigin up as both users ? , It's impossible if you have two separate tables because you'll be calling different model as well. – Vipertecpro Jul 18 '19 at 18:13

0 Answers0