@include('admin.partials.header') @include('admin.partials.sidebar') @include('admin.partials.topbar') @include('admin.partials.management-styles') @php $typeMeta = [ 'job' => ['label' => 'Jobs', 'icon' => 'work'], 'rent' => ['label' => 'Rentals', 'icon' => 'apartment'], 'hostel' => ['label' => 'Hostels', 'icon' => 'bed'], 'service' => ['label' => 'Services', 'icon' => 'construction'], ]; $activeTypes = $activeTypes ?? []; $totalApproved = array_sum($counts ?? []); $activeSort = ($filters['sort'] ?? 'newest') === 'oldest' ? 'oldest' : 'newest'; $baseFilterQuery = array_filter([ 'search' => $filters['search'] ?? null, 'date_from' => $filters['date_from'] ?? null, 'date_to' => $filters['date_to'] ?? null, 'sort' => $activeSort === 'oldest' ? 'oldest' : null, ]); $baseFilterQueryWithTypes = empty($activeTypes) ? $baseFilterQuery : array_merge($baseFilterQuery, ['types' => $activeTypes]); @endphp
Adminchevron_rightListings

Listing Inventory

Approved marketplace listings ordered by {{ $activeSort === 'oldest' ? 'oldest approval' : 'latest approval' }}.

Filter listings

Search listing, provider, or location and narrow by approval date.

@foreach ($activeTypes as $type) @endforeach
inventory_2

{{ number_format($totalApproved) }}

Approved listings

work

{{ number_format((int) ($counts['job'] ?? 0)) }}

Job postings

apartment

{{ number_format((int) (($counts['rent'] ?? 0) + ($counts['hostel'] ?? 0))) }}

Rental and hostel spaces

construction

{{ number_format((int) ($counts['service'] ?? 0)) }}

Services listed

@php $listingFilterQuery = $baseFilterQuery; @endphp All Listings {{ number_format($totalApproved) }} @foreach ($typeMeta as $type => $meta) {{ $meta['label'] }} {{ number_format((int) ($counts[$type] ?? 0)) }} @endforeach
@if (session('success'))
{{ session('success') }}
@endif

Marketplace Listings

Only admin-approved content is shown here

Approved{{ $listings->total() }} records
@forelse ($listings as $listing) @php $meta = $typeMeta[$listing->listing_type] ?? ['label' => ucfirst($listing->listing_type), 'icon' => 'inventory_2']; $providerName = $listing->provider_business_name ?: ($listing->provider_name ?: ($listing->provider_mobile ?: 'Unknown provider')); $location = collect([$listing->location, $listing->city, $listing->state])->filter()->implode(', '); @endphp @empty @endforelse
ListingCategoryProviderRankStatusApprovedViewsAction
@if ($listing->image_url){{ $listing->title }}@else{{ $meta['icon'] }}@endif

{{ $listing->title }}

LST-{{ strtoupper($listing->listing_type) }}-{{ str_pad((string) $listing->id, 5, '0', STR_PAD_LEFT) }}{{ $location ? ' ยท '.Str::limit($location, 48) : '' }}

{{ $meta['label'] }} {{ $providerName }}
@csrf
Approved {{ $listing->approved_at ? \Illuminate\Support\Carbon::parse($listing->approved_at)->format('d M Y, h:i A') : \Illuminate\Support\Carbon::parse($listing->created_at)->format('d M Y, h:i A') }} {{ number_format((int) $listing->views_count) }}
visibility edit
@csrf @method('DELETE')
No approved listings found.
{{ $listings->links('pagination::bootstrap-5') }}
@include('admin.partials.footer')