title: Laravel 8 jetstream stack inertia. Redirect to Home after Login, instead of users choice
body: <p>What happens to me is that if the user puts the url: project.test/med, the system redirects to Login but then it does not redirect to dashboard but to med. In RedirectIfAuthenticated the expression Auth::guard($guard)-&gt;check() is not evaluated or at least in the Log it is not shown, so I am not able to identify what is happening.</p>
  <pre><code>/** RedirectIfAuthenticated.php */
      public function handle($request, Closure $next, ...$guards)
      {
         $guards = empty($guards) ? [null] : $guards;
         Log::info($request);
         Log::info(Auth::user());
         foreach ($guards as $guard) {
           Log::info(Auth::guard($guard)-&gt;check());
           Log::info(Auth::check());
           if (Auth::guard($guard)-&gt;check()) {
              return redirect(RouteServiceProvider::HOME);
           }
        }
        Log::info(Auth::check());
        Log::info('end');
        return $next($request);
      }
  
      /** web.php */
       Route::middleware(['auth:sanctum', 'verified'])-&gt;get('/dashboard', function () {
           return Inertia\Inertia::render('Dashboard');
      })-&gt;name('dashboard');
      
      Route::middleware(['auth:sanctum','verified'])-&gt;get('/med', function (Request $request) {
           return Inertia\Inertia::render('Med');
      })-&gt;name('med');
  </code></pre>