@extends('layouts.app') @section('title') {{ __('messages.reviews') }} @endsection @section('content') @php $style = 'style'; @endphp
@include('flash::message')
@if($doctors->count() > 0)
@endif @forelse($doctors as $doctor)
@if($doctor->reviews->avg('rating') != 0)
@php $rating = $doctor->reviews->avg('rating'); @endphp @foreach(range(1, 5) as $i) @if($rating > 0) @if($rating > 0.5) @else @endif @else @endif @php $rating--; @endphp @endforeach
@endif
image
{{ $doctor->user->full_name }}
@foreach($doctor->specializations as $specialization) @if($loop->last) {{ $specialization->name }} @else {{ $specialization->name }}, @endif @endforeach
@forelse($doctor->reviews->where('patient_id', getLogInUser()->patient->id) as $review) @if(isset($review) && ($review->patient_id == getLogInUser()->patient->id))
{{ $review->review }}
@php $rating = $review->rating; @endphp @foreach(range(1, 5) as $i) @if($rating > 0) @if($rating > 0.5) @else @endif @else @endif @php $rating--; @endphp @endforeach
@endif @empty
@endforelse
@empty

{{ __('messages.review.no_doctors_available_to_give_rating') }}

@endforelse
@include('reviews.review_modal') @include('reviews.edit_review_modal') @endsection