@php try { $href = route($route); $pattern = $activePattern ?? (rtrim($route, '.*') . '*'); $active = request()->routeIs($pattern); } catch (\Exception $e) { $href = '#'; $active = false; } @endphp {{ $label }}