@extends('layouts.main') @section('content')
{{-- ===== HEADER ===== --}}

💰 Earnings Dashboard

{{ now()->format('d M Y') }}
{{-- ===== CARDS ===== --}} @php $cards = [ ['title' => 'Total', 'value' => $totalEarning ?? 0, 'class' => 'bg-primary-gradient', 'icon' => 'bi-wallet2'], ['title' => 'Today', 'value' => $todayEarning ?? 0, 'class' => 'bg-success-gradient', 'icon' => 'bi-graph-up'], ['title' => 'Month', 'value' => $monthlyEarning ?? 0, 'class' => 'bg-warning-gradient', 'icon' => 'bi-bar-chart'], ['title' => 'Year', 'value' => $yearlyEarning ?? 0, 'class' => 'bg-danger-gradient', 'icon' => 'bi-pie-chart'], ]; @endphp
@foreach($cards as $card)
{{ $card['title'] }}
₹ {{ number_format($card['value'], 2) }}
@endforeach
{{-- ===== TABLE ===== --}}
📊 Recent Earnings
@forelse($recentBookings as $key => $booking) @empty @endforelse
#ID User Amount Date
#{{ $key + 1 }}
{{ strtoupper(substr($booking->user->first_name ?? 'U',0,1)) }}
{{ $booking->user->first_name ?? '-' }}
{{-- Customer --}}
{{ number_format($booking->fees, 2) }}
{{ $booking->created_at->format('d M Y') }}
No Earnings Found

No earnings records available right now.

@endsection