@extends('admin.layouts.app') @section('page-title', 'Dashboard') @php use App\Models\Order; use App\Models\OrderItem; use App\Models\Shipment; use App\Models\Invoice; use App\Models\User; use App\Models\Admin; $totalOrders = Order::count(); $pendingOrders = Order::where('status', 'pending')->count(); $totalShipments = Shipment::count(); $totalItems = OrderItem::count(); $totalRevenue = Invoice::sum('final_amount_with_gst'); // USERS (CUSTOMERS) $activeCustomers = User::where('status', 'active')->count(); $inactiveCustomers = User::where('status', 'inactive')->count(); // STAFF (FROM ADMINS TABLE) $totalStaff = Admin::where('type', 'staff')->count(); $orders = Order::latest()->get(); @endphp @section('content')
Admin Dashboard
Monitor operations and manage system
📦
Total Shipments
{{ $totalShipments }}
👥
Active Customers
{{ $activeCustomers }}
💰
Total Revenue
₹{{ number_format($totalRevenue, 2) }}
Pending Order
{{ $pendingOrders }}
📦
Total Orders
{{ $totalOrders }}
🧑‍💼
Total Staff
{{ $totalStaff }}
📦
Total Items
{{ $totalItems }}
Inactive Customers
{{ $inactiveCustomers }}
@endsection