最初に php artisan make:auth で作成した認証機能である 変更箇所のみ記載、説明なし 目的 ログイン後に/homeでなく、/topにリダイレクトしたい ログイン中に/loginにアクセスした際、/topにリダイレクトしたい app\Http\Middleware\RedirectIfAuthenticated.phpの変更 public function handle($request, Closure $next, $guard = null) { if (Auth::guard($guard)->check()) { - return redirect('/home'); + return redirect('/top'); } return $next($request); }