@extends('admin.layouts.app') @section('title', 'Properties') @section('content')
@php $totalCount = \App\Models\Property::count(); $activeCount = \App\Models\Property::where('status', 'active')->count(); $saleCount = \App\Models\Property::where('listing_type', 'sale')->count(); $rentCount = \App\Models\Property::where('listing_type', 'rent')->count(); @endphp
{{ $totalCount }}
Total Properties
{{ $activeCount }}
Active Listings
{{ $saleCount }}
For Sale
{{ $rentCount }}
For Rent
@if (request()->hasAny(['search', 'status', 'listing_type', 'city'])) Clear @endif

All Properties

{{ $properties->total() }} total
@forelse($properties as $property) @empty @endforelse
Property Type Price Location Status Featured Actions
@if ($property->primary_image_url) {{ $property->title }} @else
@endif
{{ Str::limit($property->title, 35) }}
ID: {{ $property->id }} {{ $property->views_count }} views @if ($property->bedrooms) {{ $property->bedrooms }} BHK @endif
{{ $property->listing_type === 'sale' ? 'Sale' : 'Rent' }} {{ ucfirst($property->property_type) }}
{{ $property->formatted_price }} @if ($property->listing_type === 'rent') /month @endif
{{ $property->area?->name }} {{ $property->city?->name }}
@php $statusConfig = [ 'active' => ['class' => 'status-active', 'icon' => 'M5 13l4 4L19 7'], 'inactive' => [ 'class' => 'status-inactive', 'icon' => 'M18.364 18.364A9 9 0 005.636 5.636m12.728 12.728A9 9 0 015.636 5.636m12.728 12.728L5.636 5.636', ], 'sold' => [ 'class' => 'status-sold', 'icon' => 'M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z', ], 'rented' => [ 'class' => 'status-rented', 'icon' => 'M15 5v2m0 4v2m0 4v2M5 5a2 2 0 00-2 2v3a2 2 0 110 4v3a2 2 0 002 2h14a2 2 0 002-2v-3a2 2 0 110-4V7a2 2 0 00-2-2H5z', ], 'draft' => [ 'class' => 'status-draft', 'icon' => 'M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z', ], ]; $config = $statusConfig[$property->status] ?? $statusConfig['draft']; @endphp
{{ ucfirst($property->status) }} @if ($property->is_verified) Verified @endif
@csrf
@csrf @method('DELETE')

No properties found

Get started by adding your first property listing.

Add First Property
@if ($properties->hasPages())
{{ $properties->links() }}
@endif @endsection @push('styles') @endpush @push('scripts') @endpush