@php $enAttente = Route::is('user.posts.pending-approval'); $dansArchives = Route::is('user.posts.archived'); $dansFavoris = Route::is('user.posts.favorite'); $dansBoost = Route::is('user.posts.listForPromote'); @endphp
@if ($dansBoost) @else @endif
@if ($dansBoost) @elseif (!$dansFavoris && !$dansBoost) @endif @foreach ($posts as $post) @if ($dansBoost && $post['featured']) @continue @endif @php $postId = $post['id']; $postTitle = is_array($post['title'] ?? null) ? implode(' ', $post['title']) : ($post['title'] ?? 'Sans titre'); $imageUrl = (is_array($post['images'] ?? null) && isset($post['images'][0]['url'])) ? $post['images'][0]['url'] : asset_with_mtime('img/default-post.png'); @endphp @if ($dansBoost) @elseif (!$dansFavoris && !$dansBoost) @endif @includeWhen(!$dansFavoris, 'components.elements.annonce-partial', ['post' => $post]) @endforeach @if (count($posts)) @endif
Photo Détails de l'annonce PrixStatutOption Badge

{{-- {{ $postTitle }} --}} @if ($post['reviewed_at'] !== null) {{ $postTitle }} @else {{ $postTitle }} @endif

 {{ \Carbon\Carbon::parse($post['created_at'])->diffForHumans() }}

{{ $post['visits'] ?? 0 }} {{ $post['city']['name'] ?? '-' }} Flag

{{ number_format((float) ($post['price'] ?? 0), 0, ',', ' ') }} FCFA @if ($post['featured']) Déjà boostée @else @endif
@if ($dansArchives) @else Éditer @endif @if ($enAttente) @elseif ($dansArchives) @if (Auth::user()->posts()->count() < json_decode(Auth::user()->abonnement_actuel->package)->listings_limit) @else @endif @else @endif
@if ($post['is_certif'] || $post['badges_status'] == "En attente") @else @endif @if ($post['featured']) @else @endif @if ($post['post_type_id'] && $post['post_type_id'] != 6) @else @endif
{{-- --}}