@extends('layouts.app') @section('title', 'Laisser un avis') @section('content') @php // Utiliser les variables passées par le contrôleur, avec fallback $booking = $booking ?? ($bookingId ? \App\Models\Booking::with(['service', 'prestataire.user'])->find($bookingId) : null); $prestataire = $prestataire ?? ($prestataireId ? \App\Models\Prestataire::with('user')->find($prestataireId) : null); @endphp

Votre avis compte

@if($booking && $booking->service)

{{ $booking->service->name ?? $booking->service->title ?? 'Service' }} • {{ $booking->start_datetime ? $booking->start_datetime->format('d/m') : '' }}

@elseif($prestataire && $prestataire->user)

{{ $prestataire->user->name }}

@elseif($prestataire)

{{ $prestataire->company_name ?? 'Prestataire' }}

@endif
@if(session('success'))
{{ session('success') }}
@endif @if(session('error'))
{{ session('error') }}
@endif
@csrf @if($bookingId) @endif
@for($i = 1; $i <= 5; $i++) @endfor
@error('rating')

{{ $message }}

@enderror

Détails

@foreach([ 'punctuality' => 'Ponctualité', 'quality' => 'Qualité du service', 'value' => 'Rapport qualité/prix', 'communication' => 'Communication' ] as $key => $label)
{{ $label }}
@for($i = 1; $i <= 5; $i++) @endfor
@endforeach
@error('comment')

{{ $message }}

@enderror
@endsection