{{-- Logo --}}
{{-- Nav Menu --}}
-
@php $mainMenuItems = menus(1); @endphp
@foreach ($mainMenuItems as $item)
@php
if ($item->type == 'custom') {
$title = $item->title;
$url = $item->url;
} elseif ($item->type == 'page') {
$title = $item->title;
$url = $item->url;
} else {
$title = $item->category ? $item->category->name : $item->bn_name;
$url = category_url($item->category);
}
$hasChildren = $item->category && $item->category->categories->count() > 0;
$isMega = $item->category && $item->category->is_mega_menu;
@endphp
-
{{ $title }}
@if ($hasChildren)
@endif
@if ($hasChildren)
@if ($isMega)
{{-- Mega Menu --}}
@else {{-- Standard Dropdown --}}@foreach ($item->category->categories as $child) @php $childHasSub = $child->categories->count() > 0; @endphp@endforeach
{{ $child->name ?? $child->bn_name }}
@if ($childHasSub)-
@foreach ($child->categories as $grandChild)
- {{ $grandChild->name ?? $grandChild->bn_name }} @endforeach
-
@foreach ($item->category->categories as $child)
@php $childHasSub = $child->categories->count() > 0; @endphp
-
{{ $child->name ?? $child->bn_name }}
@if ($childHasSub)
@endif
@if ($childHasSub)
-
@foreach ($child->categories as $grandChild)
- {{ $grandChild->name ?? $grandChild->bn_name }} @endforeach
@endforeach
@endforeach