From 20871efb5c133339716af7396062474f47e792d1 Mon Sep 17 00:00:00 2001 From: Wisp X <1591788658@qq.com> Date: Wed, 11 May 2022 15:27:57 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E8=BF=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Http/Controllers/Admin/ConsoleController.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/Http/Controllers/Admin/ConsoleController.php b/app/Http/Controllers/Admin/ConsoleController.php index 3759432e..449793e3 100644 --- a/app/Http/Controllers/Admin/ConsoleController.php +++ b/app/Http/Controllers/Admin/ConsoleController.php @@ -18,10 +18,10 @@ class ConsoleController extends Controller $format = 'Y-m-d H:i:s'; $numbers = [ - 'today' => Image::query()->whereBetween('created_at', [$carbon->startOfDay()->format($format), $carbon->endOfDay()->format($format)])->count('id'), - 'yesterday' => Image::query()->whereBetween('created_at', [$carbon->yesterday()->startOfDay()->format($format), $carbon->yesterday()->endOfDay()->format($format)])->count('id'), - 'week' => Image::query()->whereBetween('created_at', [$carbon->startOfWeek()->format($format), $carbon->endOfWeek()->format($format)])->count('id'), - 'month' => Image::query()->whereBetween('created_at', [$carbon->startOfMonth()->format($format), $carbon->endOfMonth()->format($format)])->count('id'), + 'today' => Image::query()->whereBetween('created_at', [$carbon->startOfDay()->format($format), $carbon->endOfDay()->format($format)])->count(), + 'yesterday' => Image::query()->whereBetween('created_at', [$carbon->yesterday()->startOfDay()->format($format), $carbon->yesterday()->endOfDay()->format($format)])->count(), + 'week' => Image::query()->whereBetween('created_at', [$carbon->startOfWeek()->format($format), $carbon->endOfWeek()->format($format)])->count(), + 'month' => Image::query()->whereBetween('created_at', [$carbon->startOfMonth()->format($format), $carbon->endOfMonth()->format($format)])->count(), ]; $start = Carbon::now()->parse('-30 day')->startOfDay();