@extends('layouts.user.profile.layout') @section('title') {{ $websiteLang->where('lang_key','client_review')->first()->custom_text }} @endsection @section('user-dashboard')

{{ $websiteLang->where('lang_key','client_review')->first()->custom_text }}

@foreach ($clientReviews as $item)
img
@php $avg=$item->avarage_rating; $intAvg=intval($avg); $nextVal=$intAvg+1; $reviewPoint=$intAvg; $halfReview=false; if($intAvg < $avg && $avg < $nextVal){ $reviewPoint= $intAvg + 0.5; $halfReview=true; } @endphp

@for ($i = 1; $i <=5; $i++) @if ($i <= $reviewPoint) @elseif ($i> $reviewPoint ) @if ($halfReview==true) @php $halfReview=false @endphp @else @endif @endif @endfor

{{ $item->name }} {{ $item->created_at->format('d M Y') }} {{ $item->title }}

{{ $item->comment }}

@endforeach
{{ $clientReviews->links('user.paginator') }}
@endsection