'How to logout the desired guard in laravel

I want to know how to logout the desired guard not all guards. following code will logout all guards:

      Auth::logout();
      $request->session()->invalidate();
      $request->session()->regenerateToken();

If the user and admin loged in at the same time it will logout both. I want when admin send logout request to:

  Route::get('/admin/logout',function(){
    //some codes
  })

it logout only admin not the user. And logout only the user by following route

  Route::get('/logout',function(){
    
  })

  


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source