@extends('user.layout.master') @section('content') @php $reviews = $service->orders->pluck('reviews')->flatten(); if ($reviews->count() > 0) { $average_rating = round($reviews->avg('rating'), 2); } else { $average_rating = 0; } @endphp

{{ $service->title }}

About the Employer
Price
${{ $service->price }}

Job Description

{{ $service->description }}
{{-- MEDIA --}}

Media

@forelse ($service->media as $m) @if ($m->type == 'image') @else @endif @empty @endforelse

Reviews

@forelse ($service->orders->pluck('reviews') as $reviews) @forelse ($reviews as $review)
  • {{--

    --}}

    {{ $review->review }}

    {{ $review->created_at->diffForHumans() }}
@empty @endforelse @empty @endforelse
{{--

Location

--}} {{-- --}}
@endsection