@php $categoriesRequest ??= []; $activeCategoryId ??= 0; if (!isset($groupedCategories)) { $groupedCategories = $categories->groupBy('parent_id'); } $currentCategories = $groupedCategories->get($parentId ?? 0); @endphp @if($currentCategories) @foreach ($currentCategories as $category)
id, $categoriesRequest)) id="category-filter-{{ $category->id }}"> @if ($groupedCategories->has($category->id)) @include(Theme::getThemeNamespace('views.ecommerce.includes.categories'), [ 'categories' => $groupedCategories, 'parentId' => $category->id, ]) @endif
@endforeach @endif