route()->getName() === 'home') { return redirect()->route('login'); } return $next($request); } }