role === $role) { return $next($request); } // Redirect jika tidak memiliki akses return redirect()->route('gagal.home')->with('error', 'You do not have access to this page.'); } }