@php use Illuminate\Support\Str; $hasChildren = isset($item->children) && $item->children->count(); $isMega = Str::lower(trim($item->title)) === 'programas'; $link = '#'; if (!empty($item->route)) { try { $params = $item->parameters ? json_decode($item->parameters, true) : []; $link = route($item->route, $params ?? []); } catch (\Throwable $e) { $link = !empty($item->url) ? url($item->url) : '#'; } } else { $link = !empty($item->url) ? url($item->url) : '#'; } $isActive = url()->current() === rtrim($link, '/') || request()->fullUrlIs(rtrim($link, '/') . '*'); $icon = $item->icon_class ?: 'voyager-angle-right'; @endphp @if($desktop)
  • {{ $item->title }} @if($hasChildren) @endif @if($hasChildren && !$isMega) @endif @if($hasChildren && $isMega) @endif
  • @else
  • {{ $item->title }} @if($hasChildren) @endif
    @if($hasChildren)
    @endif
  • @endif