@foreach ($categories as $category)
@php $checkChildCategory =count($category->childrenCategories) @endphp
{{ $category->name }}
@if ($checkChildCategory)
@foreach ($category->childrenCategories as $childCategory)
-
@if ($childCategory->categories->count() > 0)
@foreach ($childCategory->categories as $grandChildCategory)
-
@endforeach
@endif
@endforeach
@endif
@endforeach