@php
$groupedCategories = ProductCategoryHelper::getProductCategoriesWithUrl()->groupBy('parent_id');
$rootCategories = $groupedCategories->get(0);
@endphp
@if ($rootCategories)
@foreach ($rootCategories as $category)
@php
$hasChildren = $groupedCategories->has($category->id);
@endphp
- $hasChildren])>
{{ $category->name }}
@if ($hasChildren)
@foreach ($groupedCategories->get($category->id) as $child)
-
{{ $child->name }}
@endforeach
@endif
@endforeach
@endif