update whereBetween

This commit is contained in:
JOSEPH LE 2024-07-31 22:00:00 +07:00
parent 26676223e4
commit dd6977a4b9
1 changed files with 1 additions and 2 deletions

View File

@ -31,8 +31,7 @@ trait AnalyzeData
// Lấy ngày cuối tháng
$endOfMonth = $now->endOfMonth()->toDateString();
$admins = Admin::all();
$history = DB::table('tracking')->select('*')
->whereBetween('tracking.created_at', [$startOfMonth, $endOfMonth])->orderBy('tracking.created_at', 'asc')->get();
$history = DB::table('tracking')->select('*')->whereBetween('tracking.created_at', [$startOfMonth, $endOfMonth])->orderBy('tracking.created_at', 'asc')->get();
$history = collect($history);
$result = [];
foreach ($admins as $admin) {