@foreach ($categories as $category)
    <li>
        @if ($category['children'] ?? false)
            <a class="dropdown-item" href="#">
                <div class="w-100">
                {{ $category['name'] }}
                <span style="float: right;">
                    <i class="fa fa-caret-right"></i>
                </span>
            </div>
            </a>
            <ul class="submenu dropdown-menu">
                @include('Shop.layout.partials.submenu', ['categories' => $category['children']])
            </ul>
        @else
            <a class="dropdown-item" href="{{ route('Shop.Categories.show', ['id' => $category['id']]) }}">{{ $category['name'] }}</a>
        @endif
    </li>
@endforeach
