{{-- * Search - Categories: Displays the Categories List --}}
Filter by category {{-- Display the hidden element for the filter --}}
@if ($multiCatElements) {{-- Display this when there are multiple elements in the JSON for the categories --}} @foreach ($data['categories'] as $parent_cat)
{{ $parent_cat['name'] }}
@if(!empty($parent_cat['categories']))
    @foreach ($parent_cat['categories'] as $second_level_cats)
  • @if(!empty($second_level_cats['categories']))
      @foreach ($second_level_cats['categories'] as $third_level_cats)
    • @endforeach
    @endif
  • @endforeach
@endif @endforeach @else {{-- Display this when there is only one element for categories in the JSON --}}
    @foreach ($data['categories'] as $parent_cat)
  • @if(!empty($parent_cat['categories']))
      @foreach ($parent_cat['categories'] as $second_level_cats)
    • @if(!empty($second_level_cats['categories']))
        @foreach ($second_level_cats['categories'] as $third_level_cats)
      • @endforeach
      @endif
    • @endforeach
  • @endif @endforeach
@endif