@php $root_categories = \App\Category::where('category_id', 0)->where('is_active', 1)->where('location_id', session('location_id'))->where('show_in_menu', true)->orderby('priority', 'asc')->limit(4)->get(); @endphp @if(count($root_categories) > 0) @foreach($root_categories as $category) @if($category->is_active)
  • @if($category->categories()->where('show_in_menu', true)->count()) {{$category->name}}
      @foreach($category->categories()->where('show_in_menu', true)->orderBy('priority', 'asc')->get() as $sub_category) @if($sub_category->is_active)
      • @if($sub_category->photo) {{$sub_category->name}} @endif
        {{$sub_category->name}}
    • @endif @endforeach
    @else {{$category->name}} @endif
  • @endif @endforeach @endif @php $root_categories = \App\Category::where('category_id', 0)->where('is_active', 1)->where('location_id', session('location_id'))->where('show_in_menu', true)->orderby('priority', 'asc')->skip(4)->take(1)->get(); @endphp @if(count($root_categories) > 0) @foreach($root_categories as $category) @if($category->is_active)
  • @if($category->categories()->where('show_in_menu', true)->count()) {{$category->name}}
      @foreach($category->categories()->where('show_in_menu', true)->orderBy('priority', 'asc')->get() as $sub_category) @if($sub_category->is_active)
      • @if($sub_category->photo) {{$sub_category->name}} @endif
        {{$sub_category->name}}
    • @endif @endforeach
    @else {{$category->name}} @endif
  • @endif @endforeach @endif
  • @lang('Offers')