Feedback
Customer Feedback
@for($i = 5; $i >= 1; $i--)
@endfor
{{ $i }} ★
@php
$percent = $feedbacks->count() ? ($starCounts[$i] / $feedbacks->count()) * 100 : 0;
@endphp
{{ $starCounts[$i] }}
Overall Rating
@php
$fullStars = floor($averageRating);
$halfStar = $averageRating - $fullStars >= 0.5;
@endphp
@for($i = 1; $i <= 5; $i++)
@if($i <= $fullStars)
★
@elseif($halfStar && $i == $fullStars + 1)
☆
@else
★
@endif
@endfor
{{ number_format($averageRating,1) }} out of 5
@foreach($feedbacks as $fb)
@endforeach
{{ $fb->order->user->name ?? 'Anonymous' }}
@for($i = 1; $i <= 5; $i++)
@if($i <= $fb->rating)
★
@else
★
@endif
@endfor
{{ $fb->comment }}
{{ $fb->created_at->format('d M Y') }}