@extends('layouts.app') @push('styles') @endpush @section('title', $service->title . ' - Service - TaPrestation') @section('content')
@if($service->images && count($service->images) > 0)
{{ $service->title }} @if(count($service->images) > 1) @endif @if(count($service->images) > 1) @endif @if(count($service->images) > 1)
1 / {{ count($service->images) }}
@endif
@else

Aucune photo disponible

@endif

Description du service

{!! nl2br(e($service->description)) !!}
@if($service->delivery_time || $service->price_type)

Informations pratiques

@if($service->delivery_time)
Délai de livraison

{{ $service->delivery_time }}

@endif @if($service->price_type)
Tarification

@if($service->price_type === 'heure' || $service->price_type === 'jour') @if($service->quantity) {{ $service->quantity }} {{ $service->price_type === 'heure' ? 'heures' : 'jours' }} à {{ number_format($service->price, 2) }}€ l'unité = {{ number_format($service->price * $service->quantity, 2) }}€ @else Prix unitaire: {{ number_format($service->price, 2) }}€ / {{ $service->price_type === 'heure' ? 'heure' : 'jour' }} @endif @else {{ number_format($service->price, 2) }}€ / {{ $service->price_type }} @endif

@endif
@endif @if($service->reservable)
Service disponible à la réservation

Ce service peut être réservé directement en ligne.

@endif

{{ $service->title }}

@if($service->price_type === 'heure' || $service->price_type === 'jour')
{{ number_format($service->price, 2) }}€ / {{ $service->price_type }}
@if($service->quantity)
Prix unitaire
{{ number_format($service->price, 2) }}€ / {{ $service->price_type === 'heure' ? 'heure' : 'jour' }}
Nombre de {{ $service->price_type === 'heure' ? 'heures' : 'jours' }}
{{ $service->quantity }}
Prix total
{{ number_format($service->price * $service->quantity, 2) }}€
@else
Prix unitaire
{{ number_format($service->price, 2) }}€ / {{ $service->price_type === 'heure' ? 'heure' : 'jour' }}
Exemple
@if($service->price_type === 'heure') Pour 3 heures: {{ number_format($service->price * 3, 2) }}€ @else Pour 3 jours: {{ number_format($service->price * 3, 2) }}€ @endif
Le prix total dépendra de la durée sélectionnée lors de la réservation
@endif
@else {{ number_format($service->price, 2) }}€ / {{ $service->price_type }} @endif

Prestataire

@if($service->prestataire->photo) {{ $service->prestataire->user->name }} @elseif($service->prestataire->user->avatar) {{ $service->prestataire->user->name }} @else
@endif @if($service->prestataire->isVerified())
@endif
{{ $service->prestataire->user->name }} @if($service->prestataire->isVerified()) Vérifié @endif
@php $averageRating = $service->prestataire->reviews()->avg('rating') ?? 0; $reviewCount = $service->prestataire->reviews()->count(); @endphp @if($reviewCount > 0)
@for($i = 1; $i <= 5; $i++) @endfor
{{ number_format($averageRating, 1) }} ({{ $reviewCount }})
@endif
Voir le profil
@if ($service->latitude && $service->longitude)

Carte

@endif

Détails

@if($service->categories->count() > 0)
Catégories
@foreach($service->categories->take(3) as $category) {{ Str::limit($category->name, 15) }} @endforeach @if($service->categories->count() > 3) +{{ $service->categories->count() - 3 }} @endif
@endif
@auth @if(auth()->user()->role === 'client' && auth()->user()->id !== $service->prestataire->user_id) @elseif(auth()->user()->id === $service->prestataire->user_id) Modifier @endif @else Se connecter @endauth
@auth @if(auth()->user()->role === 'client' && auth()->user()->id !== $service->prestataire->user_id) @endif @endauth

Services similaires

@forelse($similarServices as $similarService) @include('components.service-card', ['service' => $similarService]) @empty
Aucun service similaire trouvé.
@endforelse
@endsection @push('scripts') @if ($service->latitude && $service->longitude) @endif @endpush