title: Laravel redirection error when setting up multiple authentication guard
body: <p>I have set up an admin authentication guard as per described in this tutorial:
  <a href="https://lavalite.org/blog/multiple-authentication-in-laravel" rel="nofollow noreferrer">Laravel Multiple Auth Tutorial</a><br>
  <strong>Routes</strong></p>
  
  <pre><code>Route::group([
      'prefix' =&gt; 'admin',
      'namespace' =&gt; 'Auth'
  ], function() {
  
      Route::get('/login', 'AdminController@showLogin')-&gt;name('admin.show.login');
      Route::post('/login', 'AdminController@login')-&gt;name('admin.login');
  
      Route::group([
          'middleware' =&gt; 'auth:admin'
      ], function() {
          Route::get('/', 'AdminController@index')-&gt;name('admin.home');
          Route::get('/logout', 'AdminController@logout');
      });    
  });
  </code></pre>
  
  <p><strong>Controller</strong></p>
  
  <pre><code>class AdminController extends Controller
  {
  
      public function __construct() 
      {
          $this-&gt;middleware('guest:admin')-&gt;except('logout');
      }
  
      public function index() 
      {
          return "Admin authenticated";
      }
  
      public function showLogin() 
      {
          return view('admin.login');
      }
  
      public function login(Request $request)
      {
          $admin = Admin::where('login_id', $request-&gt;input('login'))-&gt;firstOrFail();
          Auth::guard('admin')-&gt;loginUsingId($admin-&gt;id, TRUE);
          return redirect()-&gt;intended(route('admin.home'));
      }
  
      public function logout()
      {
          Auth::guard('admin')-&gt;logout();
          return redirect()-&gt;route('admin.show.login');
      }
  }
  </code></pre>
  
  <p><strong><code>RedirectIfAuthenticated</code> middleware</strong></p>
  
  <pre><code>public function handle($request, Closure $next, $guard = null)
  {
      switch ($guard) 
      {
          case 'admin':
              if (Auth::guard($guard)-&gt;check()) 
              {
                  return redirect()-&gt;route('admin.home');
              }
              break;
  
          default:
              if (Auth::guard($guard)-&gt;check()) {
                  return redirect('/home');
              }
              break;
      }
      return $next($request);
  }
  </code></pre>
  
  <p><strong>Exception handler</strong></p>
  
  <pre><code>protected function unauthenticated($request, AuthenticationException $exception) 
  {
      if ($request-&gt;expectsJson()) 
      {
          return response()-&gt;json(['error' =&gt; 'Unauthenticated.'], 401);
      }
  
      $guard = array_get($exception-&gt;guards(), 0);
      switch  ($guard) 
      {
          case 'admin':
              $login = 'admin.show.login';
              break;
  
          default:
              $login = 'login';
              break;
      }
      return redirect()-&gt;guest(route($login));
  }
  </code></pre>
  
  <p>When <code>/admin</code> is accessed without loggin in, the <code>/admin/login</code> view is correctly. After logged in, the <code>/admin</code> URL is casuing infinite redirect loop error. The admin can be successfully logged out using <code>/admin/logout</code> route. The problem seems to be the cause of <code>RedirectIfAuthenticated</code> middleware. Am I missing something?</p>