@extends('layouts.app') @section('title', 'Admin Dashboard') @section('content')

Admin Dashboard

Welcome to TCS Courier Management System

{{ now()->format('M d, Y - h:i A') }}
Total Orders
{{ number_format($stats['total_orders']) }}
Delivered Orders
{{ number_format($stats['delivered_orders']) }}
In Transit
{{ number_format($stats['in_transit_orders']) }}
Pending Orders
{{ number_format($stats['pending_orders']) }}
Total Revenue
PKR {{ number_format($stats['total_revenue'], 2) }}
Total Users
{{ number_format($stats['total_users']) }}
Total Agents
{{ number_format($stats['total_agents']) }}
Total Offices
{{ number_format($stats['total_offices']) }}
Recent Orders
View All Orders
@if($recent_orders->count() > 0)
@foreach($recent_orders as $order) @endforeach
Tracking Code Customer Route Status Amount Date Action
{{ $order->tracking_code }} {{ $order->user->name }} {{ $order->pickupDistrict->name }} {{ $order->dropDistrict->name }} {{ ucfirst(str_replace('_', ' ', $order->status)) }} PKR {{ number_format($order->final_price, 2) }} {{ $order->created_at->format('M d, Y') }}
@else

No recent orders found

@endif
Monthly Revenue (Last 12 Months)
@if($monthly_revenue->count() > 0)
Revenue data for the last 12 months
@else

No revenue data available

@endif
@endsection @push('styles') @endpush @push('scripts') @endpush