fix dashboard month income

This commit is contained in:
Tokumeikoi 2020-06-01 01:02:45 +08:00
parent 8dc19ee67b
commit c3e924036a

View File

@ -20,7 +20,7 @@ class StatController extends Controller
'data' => [ 'data' => [
'month_income' => Order::where('created_at', '>=', strtotime(date('Y-m-1'))) 'month_income' => Order::where('created_at', '>=', strtotime(date('Y-m-1')))
->where('created_at', '<', time()) ->where('created_at', '<', time())
->where('status', 3) ->whereIn('status', [3, 4])
->sum('total_amount'), ->sum('total_amount'),
'month_register_total' => User::where('created_at', '>=', strtotime(date('Y-m-1'))) 'month_register_total' => User::where('created_at', '>=', strtotime(date('Y-m-1')))
->where('created_at', '<', time()) ->where('created_at', '<', time())