@foreach ($navLinks as $item) @php $subItems = is_array($item->sub_items) ? $item->sub_items : json_decode($item->sub_items ?? '[]', true); @endphp @if($item->type === 'list' && !empty($subItems))
  • {{-- Through the component like every other link, so a catalogue reference ("slug:42") resolves instead of being printed raw. The type is forced to `internal`: here $item->type is always `list` (it is what makes this a dropdown), and the parent of a dropdown always points inside the site — which is exactly what the previous `url($item->redirect)` assumed. --}}
      @foreach ($subItems as $sub)
    • @endforeach
  • @else
  • @endif @endforeach
  • @auth {{ __('my profile') }} @else {{ __('login') }} @endauth