@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
{{ $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