@foreach ($categories as $category)
  • children->count()) class="menu-item-has-children has-mega-menu" @endif> @if (count($category->icon->meta_value) > 0) @endif {{ $category->name }} @if ($category->children->count())
    @foreach($category->children as $childCategory)
    @if ($childCategory->children->count())

    {{ $childCategory->name }}

    @else {{ $childCategory->name }} @endif
    @endforeach
    @endif
  • @endforeach