Order::where('created_at', '>=', $today . ' 00:00:00')->count(), 'wait_receive_orders' => Order::whereIn('status', ['shipping', 'wait_receive'])->count(), 'inspecting_orders' => Order::where('status', 'inspecting')->count(), 'today_reports' => Report::where('created_at', '>=', $today . ' 00:00:00')->count(), 'total_users' => User::count(), 'total_amount' => Order::where('status', 'finished')->sum('total_price') ?? 0 ]; return jsonResponse($stat); } }