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

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

@foreach ($myReviews 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->property->title }} {{ $item->created_at->format('d M Y') }}

{{ $item->comment }}

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