@php $url = $item->url; if (str_starts_with($url, '#')) { $href = route('home') . $url; } elseif (str_starts_with($url, 'http')) { $href = $url; } elseif (\Illuminate\Support\Facades\Route::has($url)) { $href = route($url); } else { $href = url($url); } $hasChildren = isset($item->children) && $item->children->isNotEmpty(); $btnStyle = ''; if ($item->color) { $dark = adjust_hex($item->color, -22); $btnStyle = '--btn-bg:' . e($item->color) . ';--btn-dark:' . $dark . ';background:var(--btn-bg);border-color:var(--btn-bg);'; } @endphp @if($hasChildren)