Order::totalRevenue(), 'total_orders' => Order::count(), 'pending_orders' => Order::count('Pending'), 'processing_orders' => Order::count('Processing'), 'completed_orders' => Order::count('Completed'), 'total_products' => Product::count(), 'low_stock_products' => Product::lowStockCount(25), 'total_customers' => Customer::count(), ]; $recentOrders = Order::recent(6); return $this->render('dashboard/index', [ 'title' => 'Dashboard Overview', 'stats' => $stats, 'recentOrders' => $recentOrders, ]); } }