@extends('backend.app') @section('title', 'Dashboard') @push('style') @endpush @section('content') @php $property_status_map = [ 'draft' => 'secondary', 'pending' => 'warning', 'available' => 'success', 'under_contract' => 'info', 'sold' => 'dark', ]; $raffle_status_map = [ 'pending' => 'warning', 'upcoming' => 'info', 'in_progress' => 'success', 'completed' => 'secondary', ]; @endphp {{-- PAGE-HEADER --}} {{-- PAGE-HEADER --}}
Admin Overview

Operations at a glance

Live snapshots of submissions, raffles, and property demand.

Active Raffles
{{ $active_raffles ?? 0 }}
{{ $pending_raffles ?? 0 }} pending
Total Registered Customers
{{ $total_users ?? 0 }}
Agents Users
{{ $premium_users ?? 0 }}
Total Properties
{{ $total_properties ?? 0 }}
Pending Properties
{{ $pending_properties ?? 0 }}
Total Raffles
{{ $total_raffles ?? 0 }}
Total Property Views
{{ number_format($total_views ?? 0) }}

Recent Property Submissions

Newest listings from agents.

View all
@forelse ($recent_properties as $property) @php $status_class = $property_status_map[$property->status] ?? 'secondary'; @endphp @empty @endforelse
Property Agent Status Views
{{ \Illuminate\Support\Str::limit($property->title, 32) }}
{{ $property->created_at?->diffForHumans() }}
{{ $property->agent?->name ?? 'Unknown' }} {{ ucfirst(str_replace('_', ' ', $property->status)) }} {{ number_format($property->views ?? 0) }}
No recent submissions yet.

Raffles Near Deadline

Pending and active raffles closing soon.

Review
@forelse ($nearing_deadline_raffles as $raffle) @php $raffle_status_class = $raffle_status_map[$raffle->status] ?? 'secondary'; @endphp @empty @endforelse
Property Status Deadline Tickets
{{ \Illuminate\Support\Str::limit($raffle->property?->title ?? 'Unknown', 28) }}
{{ $raffle->dead_line?->diffForHumans() ?? 'No deadline' }}
{{ ucfirst(str_replace('_', ' ', $raffle->status)) }} {{ $raffle->dead_line?->format('M d, Y') ?? '-' }} {{ $raffle->tickets_available ?? 0 }}
No deadlines in the next 7 days.

Upcoming Draw Dates

Next raffles ready for draw.

Draw board
@forelse ($upcoming_draws as $raffle) @empty @endforelse
Property Draw Date Tickets Sold
{{ \Illuminate\Support\Str::limit($raffle->property?->title ?? 'Unknown', 30) }}
{{ ucfirst(str_replace('_', ' ', $raffle->status)) }}
{{ $raffle->draw_date?->format('M d, Y') ?? '-' }} {{ $raffle->tickets_sold ?? 0 }}
No upcoming draws yet.

Property Views by Month

Based on listings created in {{ $current_year }}.

Views

Top Viewed Properties

Highest demand right now.

@forelse ($top_viewed_properties as $property)
{{ \Illuminate\Support\Str::limit($property->title, 32) }}
{{ $property->address ?? 'Address not set' }}
{{ number_format($property->views ?? 0) }}
@empty
No views data available yet.
@endforelse

Raffle Ticket Sales by Month

Tickets sold in {{ $current_year }}.

Tickets Sold
@endsection @push('scripts') @endpush