@extends('layouts.admin') @section('title','Dashboard') @section('page-title','Dashboard') @section('content')
@foreach([ ['fa-money-bill-wave','Total Revenue','Rs. '.number_format($stats['total_revenue']),'text-green-500','bg-green-50'], ['fa-bag-shopping','Total Orders',$stats['total_orders'],'text-primary','bg-orange-50'], ['fa-box','Products',$stats['total_products'],'text-blue-500','bg-blue-50'], ['fa-users','Customers',$stats['total_users'],'text-purple-500','bg-purple-50'], ] as [$icon,$label,$val,$color,$bg])
{{ $label }}

{{ $val }}

@endforeach

{{ $stats['pending_orders'] }}

Pending Orders

Rs. {{ number_format($stats['monthly_revenue']) }}

This Month Revenue

{{ $stats['low_stock'] }}

Low Stock Items

{{ $stats['out_of_stock'] }}

Out of Stock

Quick Add Product

For non-technical admins: Use this simple form to quickly list a product.

Switch to Advanced Form
@csrf
{{-- Recent Orders --}}

Recent Orders

View all
@foreach($recentOrders as $order) @endforeach
Order Customer Status Total
{{ $order->order_number }} {{ $order->user->name }} {{ $order->status }} Rs. {{ number_format($order->total) }}
{{-- Top Products + Recent Users --}}

Top Products

@foreach($topProducts as $p)

{{ $p->name }}

{{ $p->sales_count }} sold
@endforeach

New Customers

@foreach($recentUsers as $u)

{{ $u->name }}

{{ $u->created_at->diffForHumans() }}

@endforeach
@endsection