@extends('layouts.app') @section('title', 'Mes Annonces') @push('styles') @endpush @section('content')

Mes Annonces

@if(session('success'))
{{ session('success') }}
@endif @if(session('error'))
{{ session('error') }}
@endif @if($annonces->count() > 0)
@foreach($annonces as $annonce)
@if($annonce->estPubliee()) Publiée @elseif($annonce->estBrouillon()) Brouillon @elseif($annonce->statut === 'en_attente') En attente @elseif($annonce->statut === 'rejetee') Rejetée @elseif($annonce->estExpiree()) Expirée @endif @if($annonce->estUrgent()) URGENT @endif
@if($annonce->photoPrincipale()) {{ $annonce->titre }} @else
Aucune photo
@endif
{{ ucfirst($annonce->type) }} @if($annonce->category) {{ $annonce->category->nom }} @endif

{{ Str::limit($annonce->titre, 50) }}

@if($annonce->prix)
{{ number_format($annonce->prix, 0, ',', ' ') }} FCFA
@endif
{{ $annonce->created_at->format('d/m/Y') }}
{{ $annonce->vues }}
@if($annonce->nb_photos > 0)
{{ $annonce->nb_photos }}
@endif
Voir détails
@if($annonce->estBrouillon())
@csrf
@endif
@csrf @method('DELETE')
@endforeach
{{ $annonces->links() }}
@else

Aucune annonce pour le moment

C'est le moment idéal pour commencer à vendre ! Créez votre première annonce en quelques clics.

Créer ma première annonce
@endif
@endsection