@extends('layouts.app') @section('title', $annonce->titre) @section('content')
@if($annonce->vendeur && $annonce->vendeur->type === 'professionnel')
@if($annonce->vendeur->pagePro && $annonce->vendeur->pagePro->logo) Logo @else @endif
{{ number_format($boutique_rating, 1, ',', '') }}/5 sur {{ number_format($boutique_avis_count, 0, ',', ' ') }} {{ $boutique_avis_count > 1 ? 'avis' : 'avis' }}
@else @endif
@if($annonce->video)
@endif @if($annonce->photos->count() > 0) @foreach($annonce->photos as $photo)
Vue {{ $loop->iteration }}
@endforeach @elseif(!$annonce->video)
@endif
@if($annonce->video) @else @php $photoPrincipale = $annonce->photoPrincipale(); @endphp @if($photoPrincipale) {{ $annonce->titre }} @else
Aucune image disponible
@endif @endif

{{ $annonce->titre }}

@php $moyenneNote = $annonce->note_moyenne; $nbAvis = $annonce->nombre_avis; @endphp @for($i = 1; $i <= 5; $i++) @if($i <= floor($moyenneNote)) @elseif($i == ceil($moyenneNote) && ($moyenneNote - floor($moyenneNote)) >= 0.5) @else @endif @endfor
({{ $nbAvis }})
Description détaillée
{!! nl2br(e($annonce->description)) !!}
Caractéristiques techniques
@if($annonce->should_show_etat)
État : {{ $annonce->etat_libelle }}
|
@endif
Disponibilité : {{ ucfirst(str_replace('_', ' ', $annonce->disponibilite)) }}
@if($annonce->category)
|
Catégorie : {{ $annonce->category->nom }}
@endif @if($annonce->type_livraison)
|
Expédition : @if($annonce->type_livraison == 'retrait_point_relais') Retrait en point retrait @elseif($annonce->type_livraison == 'retrait_boutique') Retrait en boutique @elseif($annonce->type_livraison == 'livraison_point_special') Livraison en point spécial @else {{ ucfirst(str_replace('_', ' ', $annonce->type_livraison)) }} @endif
@endif
Prix de vente
{{ number_format($annonce->prix, 0, ',', ' ') }} FCFA @if($annonce->prix_original && $annonce->prix_original > $annonce->prix) {{ number_format($annonce->prix_original, 0, ',', ' ') }} @endif
@if($annonce->peutEtreAchete())
@csrf
@else @if(auth()->check()) @else Contacter le vendeur @endif @endif
@if($annonce->vendeur)
@if($annonce->vendeur->type === 'professionnel' && $annonce->vendeur->pagePro && $annonce->vendeur->pagePro->logo) Logo @else @endif
Vendeur vérifié
@if($annonce->vendeur->type === 'professionnel') {{ $annonce->vendeur->identite }} PRO @else {{ $annonce->vendeur->identite ?? ($annonce->user->prenom . ' ' . $annonce->user->nom) }} Particulier @endif
@if($annonce->vendeur->type === 'professionnel') @else @endif
@endif
@if($annonce->avisApprouves->count() > 0)

Avis clients

{{ number_format($annonce->note_moyenne, 1) }}
@for($i=1; $i<=5; $i++) @endfor
Basé sur {{ $annonce->nombre_avis }} avis
@php $stats = [ 5 => $annonce->avisApprouves->where('note', 5)->count(), 4 => $annonce->avisApprouves->where('note', 4)->count(), 3 => $annonce->avisApprouves->where('note', 3)->count(), 2 => $annonce->avisApprouves->where('note', 2)->count(), 1 => $annonce->avisApprouves->where('note', 1)->count(), ]; $total = max(1, $annonce->nombre_avis); @endphp @foreach([5, 4, 3, 2, 1] as $seuil)
{{ $seuil }}
{{ $stats[$seuil] }}
@endforeach
@foreach($annonce->avisApprouves as $avis)
{{ strtoupper(substr($avis->user->prenom, 0, 1)) }}{{ strtoupper(substr($avis->user->nom, 0, 1)) }}
{{ $avis->user->prenom }} {{ $avis->user->nom }}
@for($i=1; $i<=5; $i++) @endfor
{{ $avis->created_at->translatedFormat('d F Y') }}

{{ $avis->commentaire }}

@endforeach
@endif @if(isset($recommandations['meilleures_offres_pro']) && $recommandations['meilleures_offres_pro']->count() > 0)
Sponsorisée

Meilleures offres Pros

@endif @if(isset($recommandations['aussi_vus']) && $recommandations['aussi_vus']->count() > 0)

Articles également vus

@endif
{{-- Floating Quick Chat Window --}} @if(auth()->check()) @endif @push('scripts') @endpush @endsection