@extends('app::layouts.app')
@section('title', 'My Listings')
@section('content')
@php
$statusTabs = [
[
'key' => 'all',
'label' => 'All Listings',
'count' => (int) ($counts['all'] ?? 0),
'description' => 'All listings in your account',
],
[
'key' => 'sold',
'label' => 'Sold',
'count' => (int) ($counts['sold'] ?? 0),
'description' => 'Closed sales',
],
[
'key' => 'expired',
'label' => 'Expired',
'count' => (int) ($counts['expired'] ?? 0),
'description' => 'Waiting to be republished',
],
];
$overviewCards = [
[
'label' => 'Total Listings',
'value' => (int) ($counts['all'] ?? 0),
'hint' => 'Every listing in your panel',
],
[
'label' => 'Live',
'value' => (int) ($counts['active'] ?? 0),
'hint' => 'Visible to visitors right now',
],
[
'label' => 'Sold',
'value' => (int) ($counts['sold'] ?? 0),
'hint' => 'Listings closed by sale',
],
[
'label' => 'Expired',
'value' => (int) ($counts['expired'] ?? 0),
'hint' => 'Listings waiting to be republished',
],
];
$hasFilters = $search !== '' || $status !== 'all';
@endphp
Panel
My Listings
Track all your listings from one screen. Dates, status, and engagement are clearer, while search and filters stay compact.
@foreach ($overviewCards as $card)
{{ $card['label'] }}
{{ number_format($card['value']) }}
{{ $card['hint'] }}
@endforeach
Filter
Search and status
Search by title or narrow the view within {{ number_format($listings->total()) }} results.
@forelse ($listings as $listing)
@php
$statusMeta = $listing->panelStatusMeta();
$listingImage = $listing->primaryImageData('card');
$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('M j, Y') ?? 'No expiry';
$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)
@include('listing::partials.responsive-image', [
'image' => $listingImage,
'alt' => $listing->title,
'class' => 'h-full w-full object-cover',
])
@else
No image
@endif
{{ $statusMeta['label'] }}
@if ($listing->category)
{{ $listing->category->name }}
@endif
{{ $listing->panelLocationLabel() }}
{{ $listing->title }}
{{ $statusMeta['hint'] }}
{{ $priceLabel }}
Published
{{ $publishedLabel }}
First visible date
{{ $listing->expires_at ? 'End date' : 'Listing duration' }}
{{ $expiresLabel }}
{{ $listing->panelExpirySummary() }}
Engagement
{{ number_format($viewCount) }} views
{{ number_format($favoriteCount) }} saved
@if ($videoSummary)
{{ $videoSummary['label'] }}
{{ $videoSummary['detail'] }}
@endif
@if ($listing->statusValue() === 'expired')
This listing has expired. If it is sold you can keep it closed, otherwise republish it.
@elseif ($listing->statusValue() === 'pending')
This listing is in moderation review. It will go live automatically once approved.
@endif
@if ($listing->statusValue() === 'expired')
@elseif ($listing->statusValue() !== 'sold')
@endif
@empty
Empty State
No listings match this filter
Clear the search term, pick another status, or create a new listing to fill this space.
@endforelse
@if ($listings->hasPages())
{{ $listings->links() }}
@endif
@endsection