{{ $section['section_title_main'] ?? '' }} {{ $section['section_title_last'] ?? '' }}

{{ $section['section_label'] ?? '' }}

@if(!empty($section['section_content']) && count($section['section_content']) > 0)
    @foreach ($categories as $index => $category)
  • {{ $category->name }}
  • @endforeach
@foreach ($categories as $index => $category)
@php // Filter popular services for the current category $filteredServices = collect($popularSection['section_content'])->filter(function($service) use ($category) { return $service->source_category == $category->id; }); @endphp @if ($filteredServices->isEmpty())

{{ __('No popular services found for this category.') }}

@else
@foreach ($filteredServices as $popularService)
@if (!empty($popularService->product_images) && is_array($popularService->product_images)) @foreach (array_slice($popularService->product_images, 0, 1) as $image) img @endforeach @endif
{{ $popularService->source_name }}
@php $rating = $popularService->average_rating ?? 0; @endphp

@if ($rating >= 1) {{-- Filled star --}} @elseif ($rating >= 0.5) {{-- Half star --}} @else {{-- Empty star --}} @endif {{ number_format($rating, 1) }} ({{ $popularService->review_count }} {{ __('Reviews') }})

{{ __('From') }} {{$currency_details->symbol ?? '$'}}{{ $popularService->source_price }}
@endforeach
@endif
@endforeach
{{ __('View All') }}
@else
{{ __('No popular service available.') }}
@endif