@extends('app::layouts.app') @section('title', 'İlanlarım') @section('content') @php $statusTabs = [ [ 'key' => 'all', 'label' => 'Tüm İlanlar', 'count' => (int) ($counts['all'] ?? 0), 'description' => 'Hesabındaki tüm ilanlar', ], [ 'key' => 'sold', 'label' => 'Satıldı', 'count' => (int) ($counts['sold'] ?? 0), 'description' => 'Kapanan satışlar', ], [ 'key' => 'expired', 'label' => 'Süresi Doldu', 'count' => (int) ($counts['expired'] ?? 0), 'description' => 'Yeniden yayın bekleyenler', ], ]; $overviewCards = [ [ 'label' => 'Toplam İlan', 'value' => (int) ($counts['all'] ?? 0), 'hint' => 'Panelindeki tüm kayıtlar', ], [ 'label' => 'Yayında', 'value' => (int) ($counts['active'] ?? 0), 'hint' => 'Şu anda ziyaretçilere açık', ], [ 'label' => 'Satıldı', 'value' => (int) ($counts['sold'] ?? 0), 'hint' => 'Satışla kapanan ilanlar', ], [ 'label' => 'Süresi Doldu', 'value' => (int) ($counts['expired'] ?? 0), 'hint' => 'Yeniden yayın bekleyen ilanlar', ], ]; $hasFilters = $search !== '' || $status !== 'all'; $pendingCount = (int) ($counts['pending'] ?? 0); @endphp

İlanlarım

Tüm ilanlarını tek ekranda takip et. Tarih, durum ve etkileşim bilgileri artık daha net; arama ve filtre alanı ise daha kompakt.

@if ($hasFilters) @endif
@foreach ($overviewCards as $card)

{{ $card['label'] }}

{{ number_format($card['value']) }}

{{ $card['hint'] }}

@endforeach

Arama ve durum

{{ number_format($listings->total()) }} sonuç içinde başlığa göre ara veya görünümü hızlıca daralt.

@forelse ($listings as $listing) @php $statusMeta = $listing->panelStatusMeta(); $listingImage = $listing->panelPrimaryImageUrl(); $priceLabel = $listing->panelPriceLabel(); $favoriteCount = (int) ($listing->favorited_by_users_count ?? 0); $viewCount = (int) ($listing->view_count ?? 0); $publishedAt = $listing->panelPublishedAt(); $publishedLabel = $publishedAt?->format('d.m.Y') ?? '-'; $expiresLabel = $listing->expires_at?->format('d.m.Y') ?? 'Süresiz'; $videoCount = (int) ($listing->videos_count ?? 0); $readyVideoCount = (int) ($listing->ready_videos_count ?? 0); $pendingVideoCount = (int) ($listing->pending_videos_count ?? 0); $videoSummary = $listing->panelVideoSummary($videoCount, $readyVideoCount, $pendingVideoCount); @endphp
@if ($listingImage) {{ $listing->title }} @else
Görsel Yok
@endif
{{ $statusMeta['label'] }} @if ($listing->category) {{ $listing->category->name }} @endif {{ $listing->panelLocationLabel() }}

{{ $listing->title }}

{{ $statusMeta['hint'] }}

{{ $priceLabel }}

Yayına alındı {{ $publishedLabel }} İlk görünür olduğu kayıt tarihi
{{ $listing->expires_at ? 'Bitiş tarihi' : 'Yayın süresi' }} {{ $expiresLabel }} {{ $listing->panelExpirySummary() }}
Etkileşim {{ number_format($viewCount) }} görüntülenme {{ number_format($favoriteCount) }} favori
@if ($videoSummary)
{{ $videoSummary['label'] }} {{ $videoSummary['detail'] }}
@endif @if ($listing->statusValue() === 'expired')
Bu ilanın süresi doldu. Satıldıysa kapatabilir, devam edecekse yeniden yayına alabilirsin.
@elseif ($listing->statusValue() === 'pending')
İlan şu anda moderasyon kontrolünde. Onaylandığında otomatik olarak yayında görünür.
@endif
@if ($listing->statusValue() === 'expired')
@csrf
@elseif ($listing->statusValue() !== 'sold')
@csrf
@endif
@csrf
@empty

Bu filtreye uygun ilan bulunamadı

Arama terimini temizleyebilir, farklı bir durum seçebilir veya yeni ilan oluşturarak bu alanı doldurabilirsin.

@if ($hasFilters) @endif
@endforelse
@if ($listings->hasPages())
{{ $listings->links() }}
@endif
@endsection