@php
$modelCategory = (new \App\Models\ShopCategory);
$categories = $modelCategory->getCategoriesAll();
$categoriesTop = $modelCategory->getCategoriesTop();
@endphp
@if ($categoriesTop->count())
{{ trans('front.categories') }}
@foreach ($categoriesTop as $key => $category)
@if (!empty($categories[$category->id]))
@foreach ($categories[$category->id] as $cateChild)
-
- {{ $cateChild->name }}
@if (!empty($categories[$cateChild->id]))
@foreach ($categories[$cateChild->id] as $cateChild2)
-
-- {{ $cateChild2->name }}
@endforeach
@endif
@endforeach
@else
@endif
@endforeach
@endif