@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'); $dansCertif = Route::is('user.posts.listForCertif'); $boostStarter = \App\Models\Package::find(2); $boostPro = \App\Models\Package::find(3); $starterPrice = (int) ($boostStarter->price ?? 2000); $proPrice = (int) ($boostPro->price ?? 3500); $badgePrice = 5000; @endphp
@if ($dansCertif) @elseif ($dansBoost) @else @endif
@if ($dansBoost && $dansCertif) @elseif (!$dansFavoris && !$dansBoost && !$dansCertif) @if (!$enAttente && !$dansArchives) @endif @endif @foreach ($posts as $post) @if ( $dansBoost && $dansCertif && $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) && !empty($post['images'][0]['url'])) ? $post['images'][0]['url'] : ((is_array($post['images'] ?? null) && !empty($post['images'][0]['secondary_url'])) ? $post['images'][0]['secondary_url'] : asset_with_mtime('img/default-post.png')); $secondaryImageUrl = (is_array($post['images'] ?? null) && isset($post['images'][0]['secondary_url'])) ? $post['images'][0]['secondary_url'] : ''; $videoUrl = (is_array($post['videos'] ?? null) && !empty($post['videos'][0]['url'])) ? $post['videos'][0]['url'] : ((is_array($post['videos'] ?? null) && !empty($post['videos'][0]['secondary_url'])) ? $post['videos'][0]['secondary_url'] : null); $secondaryVideoUrl = (is_array($post['videos'] ?? null) && isset($post['videos'][0]['secondary_url'])) ? $post['videos'][0]['secondary_url'] : ''; @endphp @if ($dansBoost) @elseif ($dansCertif) @elseif (!$dansFavoris && !$dansBoost && !$dansCertif) @if (!$enAttente && !$dansArchives) @endif @endif @includeWhen(!$dansFavoris, 'components.elements.annonce-partial', ['post' => $post]) @endforeach @if (count($posts) == 0) @endif
Photo Détails de l'annonce PrixStatutOptionsDistinctions

{{-- {{ $postTitle }} --}} @if ($post['reviewed_at'] && !$post['archived_at'] && !$post['archived_manually_at']) {{ $postTitle }} @else {{ $postTitle }} @endif {{-- --}}

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

{{ number_format((float) ($post['price'] ?? 0), 0, ',', ' ') }} FCFA @if ($post['featured']) Déjà boostée @else @if (Auth::check() && Auth::user()->abonnement_actuel?->package_id == 6) Booster @else @endif @endif @if ($post['is_certif'] || ($post['badges_status'] ?? null) == "Validé") Recommandée @elseif (($post['badges_status'] ?? null) == "En attente") En attente @else @endif
@if ($dansArchives) @else Éditer @endif @if ($enAttente) @elseif ($dansArchives) @php $user = Auth::user(); $abonnement = $user->abonnement_actuel; $listingsLimit = max(0, (int) ($abonnement->annonces_autorises ?? 0)); $actualActivedPostCount = \App\Models\Post::where('user_id', $user->id) ->whereNull('archived_at') ->whereNull('archived_manually_at') ->count(); @endphp @if ($actualActivedPostCount < $listingsLimit) @else @endif @else @endif
@if ($post['is_certif'] || ($post['badges_status'] ?? null) == "En attente") @else @endif @if ($post['featured']) @else @if (Auth::check() && Auth::user()->abonnement_actuel?->package_id == 6) Booster @else @endif @endif {{-- @if ($post['post_type_id'] != null || (Auth::user() && Auth::user()->abonnement_actuel?->package_id == 6)) --}} @if (Auth::user() && Auth::user()->abonnement_actuel && ($post['post_type_id'] != null || Auth::user()->abonnement_actuel->package_id == 6)) @else @endif
🔍 Aucune annonce pour l'instant.
{{-- --}} {{-- --}} @include('components.modals.subscriptionRequired')