@php
$integerPart = floor($data['averageRating']);
$decimalPart = $data['averageRating'] - $integerPart;
@endphp
@for ($i = 1; $i <= $integerPart; $i++)
@endfor
@if ($decimalPart > 0)
@else
@for ($i = 1; $i <= 5 - $integerPart; $i++)
@endfor
@endif
{{ __('dashboard.overall_rating') }} {{ $data['totalCustomer'] }} {{ __('dashboard.customers') }}
{{ __('dashboard.excellent') }}
{{ $data['reviews']->where('rating', '5.0')->count('rating') }}
{{ __('dashboard.good') }}
{{ $data['reviews']->where('rating', '>=', 4)->where('rating', '<', 5)->count() }}
{{ __('dashboard.average') }}
{{ $data['reviews']->where('rating', '>=', 3)->where('rating', '<', 4)->count() }}
{{ __('dashboard.avg_below') }}
{{ $data['reviews']->where('rating', '>=', 2)->where('rating', '<', 3)->count() }}
{{ __('dashboard.poor') }}
{{ $data['reviews']->where('rating', '>=', 1)->where('rating', '<', 2)->count() }}