<ul class="navbar-nav w-100">
    @foreach ($categories as $menu)
        <li class="nav-item dropdown megamenu p-2 col 
        @if (in_array($menu['id'], [$category['id'] ?? false, $category['parent_id'] ?? false, $category['parent']['parent_id'] ?? false])) active @endif">
            @if ($menu['children'] ?? false)
                <a id="megamenu_{{ $menu['id'] }}" href="{{ route('Shop.Categories.show', ['id' => $menu['id']]) }}" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" class="nav-link dropdown-toggle text-uppercase">
                    {{ $menu['name'] }}
                </a>
                <div aria-labelledby="megamenu_{{ $menu['id'] }}" class="dropdown-menu border-0 p-0 m-0">
                    @include('Shop.layout.partials.megamenu')
                </div>
            @else
                <a href="{{ route('Shop.Categories.show', ['id' => $menu['id']]) }}" class="nav-link text-uppercase text-white">
                    {{ $menu['name'] }}
                </a>
            @endif
        </li>
    @endforeach
</ul>
