@use('App\Models\ProductCategory')
@if($ProductCategory->Children()->count()>0)
    @foreach($ProductCategory->Children as $childCategory)
        <li class="menu-item @if($childCategory->Children()->count()>0) menu-item-has-children has-child @endif">
            <a href="{{ route('products',$childCategory->id) }}" class="menu-name" data-title="{{ $childCategory->title }}">
                <img src="{{ $childCategory->imageUrl }}" style="height:25px;" alt="">{{ $childCategory->title }} </b>
            </a>
            @if($childCategory->Children()->count()>0)
                <ul class="sub-menu">
                    @php
                        echo App\Http\Controllers\ProductCategoryController::Dropdown($childCategory->id);
                    @endphp 
                </ul>
            @endif
        </li>
    @endforeach
@endif
{{-- 
<li class="menu-item">
    <a href="#" class="menu-name" data-title="Ocean Foods">
        <i class="biolife-icon icon-fish"></i>Ocean Foods
    </a>
</li>
<li class="menu-item menu-item-has-children has-child">
    <a href="#" class="menu-name" data-title="Butter & Eggs">
        <i class="biolife-icon icon-honey"></i>
        Butter & Eggs
    </a>
    <ul class="sub-menu">
        <li class="menu-item"><a href="#">Omelettes</a></li>
        <li class="menu-item"><a href="#">Breakfast Scrambles</a></li>
        <li class="menu-item menu-item-has-children has-child"><a href="#" class="menu-name"
                data-title="Eggs & other considerations">Eggs &
                other considerations</a>
            <ul class="sub-menu">
                <li class="menu-item"><a href="#">Classic Breakfast</a></li>
                <li class="menu-item"><a href="#">Huevos Rancheros</a></li>
                <li class="menu-item"><a href="#">Everything Egg
                        Sandwich</a></li>
                <li class="menu-item"><a href="#">Egg Sandwich</a></li>
                <li class="menu-item"><a href="#">Vegan Burrito</a></li>
                <li class="menu-item"><a href="#">Biscuits and Gravy</a>
                </li>
                <li class="menu-item"><a href="#">Bacon Avo Egg Sandwich</a>
                </li>
            </ul>
        </li>
        <li class="menu-item"><a href="#">Griddle</a></li>
        <li class="menu-item menu-item-has-children has-child"><a href="#" class="menu-name"
                data-title="Sides & Extras">Sides & Extras</a>
            <ul class="sub-menu">
                <li class="menu-item"><a href="#">Breakfast Burrito</a></li>
                <li class="menu-item"><a href="#">Crab Cake Benedict</a>
                </li>
                <li class="menu-item"><a href="#">Corned Beef Hash</a></li>
                <li class="menu-item"><a href="#">Steak & Eggs</a></li>
                <li class="menu-item"><a href="#">Oatmeal</a></li>
                <li class="menu-item"><a href="#">Fruit & Yogurt Parfait</a>
                </li>
            </ul>
        </li>
        <li class="menu-item"><a href="#">Biscuits</a></li>
        <li class="menu-item"><a href="#">Seasonal Fruit Plate</a></li>
    </ul>
</li> --}}