@php $headerContent = $headerContent ?? []; $configuredLinks = collect($headerContent['links'] ?? []); $navigationLinks = $configuredLinks->isNotEmpty() ? $configuredLinks : collect($primaryNavigation ?? [])->map(fn (array $item): array => [ 'enabled' => true, 'label' => $item['label'] ?? 'Link', 'url' => $item['url'] ?? '#', ]); $navigationLinks = $navigationLinks->filter( fn (array $link): bool => filter_var($link['enabled'] ?? true, FILTER_VALIDATE_BOOL) ); @endphp @if (filter_var($headerContent['show_mobile_menu'] ?? true, FILTER_VALIDATE_BOOL))
@foreach ($navigationLinks as $link) {{ $link['label'] ?? 'Link' }} @endforeach
@endif