@php
$countPostsPerCat ??= [];
// Clear Filter Button
$clearFilterBtn = \App\Services\UrlGen::getCategoryFilterClearLink($cat ?? null, $city ?? null);
@endphp
@if (!empty($cat))
@php
$catParentUrl = \App\Services\UrlGen::parentCategory(data_get($cat, 'parent') ?? null, $city ?? null);
@endphp
{{-- SubCategory --}}
@if (!empty(data_get($cat, 'children')))
@else
@if (!empty(data_get($cat, 'parent.children')))
@foreach (data_get($cat, 'parent.children') as $iSubCat)
-
@if (data_get($iSubCat, 'id') == data_get($cat, 'id'))
@if (in_array(config('settings.listings_list.show_category_icon'), [4, 5, 6, 8]))
@endif
{{ str(data_get($iSubCat, 'name'))->limit(100) }}
@if (config('settings.listings_list.count_categories_listings'))
({{ $countPostsPerCat[data_get($iSubCat, 'id')]['total'] ?? 0 }})
@endif
@else
@if (in_array(config('settings.listings_list.show_category_icon'), [4, 5, 6, 8]))
@endif
{{ str(data_get($iSubCat, 'name'))->limit(100) }}
@if (config('settings.listings_list.count_categories_listings'))
({{ $countPostsPerCat[data_get($iSubCat, 'id')]['total'] ?? 0 }})
@endif
@endif
@endforeach
@else
@includeFirst(
[config('larapen.core.customizedViewPath') . 'search.inc.sidebar.categories.root', 'search.inc.sidebar.categories.root'],
['countPostsPerCat' => $countPostsPerCat]
)
@endif
@endif
@else
@includeFirst(
[config('larapen.core.customizedViewPath') . 'search.inc.sidebar.categories.root', 'search.inc.sidebar.categories.root'],
['countPostsPerCat' => $countPostsPerCat]
)
@endif