@php $categories = App\Models\Category::with('subcategory')->whereStatus(1)->orderby('serial','asc')->take(8)->get(); @endphp

{{ __('Categories') }}

@foreach ($categories as $key => $pcategory)
{{$pcategory->name}} @if ($pcategory->subcategory->count() > 0) @endif @if ($pcategory->subcategory->count() > 0)
@foreach ($pcategory->subcategory as $scategory)
{{$scategory->name}} @if ($scategory->childcategory->count() > 0) @endif @if ($scategory->childcategory->count() > 0)
@foreach ($scategory->childcategory as $childcategory) {{$childcategory->name}} @endforeach
@endif
@endforeach
@endif
@endforeach {{ __('All Categories')}}