@php $hasChildren = isset($item->children) && count($item->children) > 0; $url = '#'; // URL belirleme: Önce dış link kontrolü, sonra SEO URL if (!empty($item->seo_url)) { // Eğer seo_url bir tam URL ise (http/https ile başlıyorsa) dış link if (filter_var($item->seo_url, FILTER_VALIDATE_URL)) { $url = $item->seo_url; } else { // İç link - SEO URL'yi kullan $url = url($item->seo_url); } } else { // SEO URL yoksa ana sayfa veya sayfa ID'si ile $url = url('/'); } $isActive = request()->is($item->seo_url) || request()->path() == ltrim($item->seo_url, '/'); @endphp