@include('admin.dash.layout.header')

Dashboard

Welcome to stizee admin Dashboard.

Total Users
{{number_format(DB::table("users")->count())}}
@php $currentUsers = DB::table("users")->whereMonth('created_at', now()->month)->count(); $lastMonthUsers = DB::table("users")->whereMonth('created_at', now()->subMonth()->month)->count(); $growth = $lastMonthUsers > 0 ? (($currentUsers - $lastMonthUsers) / $lastMonthUsers) * 100 : 0; @endphp {{ $growth >= 0 ? '↗' : '↘' }} {{ number_format(abs($growth), 1) }}% this month
Total Merchants
{{number_format(DB::table("users")->where(["is_merchant"=>1])->count())}}
↗ Active merchants
Total Products
{{number_format(DB::table("products")->count())}}
↗ Products listed
Total Orders
{{number_format(DB::table("orders")->count())}}
↗ All time orders
Pending Orders
{{number_format(DB::table("orders")->where(["status"=>"pending"])->count())}}
Needs attention
Total Revenue
GHS {{number_format(DB::table("orders")->sum('total_amount'))}}
↗ Total earnings
Orders Over Time (Last 7 Days)
Daily Revenue Trend
Product Categories
Order Status Distribution
User Registrations (Last 6 Months)
Transaction Types
Recent Orders
@foreach(DB::table("orders")->leftJoin("products","products.id","orders.product_id")->select("orders.*","products.title","products.image","products.price")->latest('orders.order_date')->limit(4)->get() as $order)
@if($order->image) @else {{substr($order->title ?? 'Photo Order', 0, 2)}} @endif
{{ucfirst($order->status)}}
{{date('M d', strtotime($order->order_date))}}
@endforeach
@include('admin.dash.layout.footer')