From f614e07b8fcede0fadd71d3cb07dbb52ac2837d7 Mon Sep 17 00:00:00 2001 From: lkddi Date: Thu, 12 Mar 2026 08:53:23 +0800 Subject: [PATCH] =?UTF-8?q?fix(chat):=20=E4=BF=AE=E6=AD=A3=E4=BA=94?= =?UTF-8?q?=E5=AD=90=E6=A3=8B=E6=9F=A5=E8=AF=A2=E7=8A=B6=E6=80=81=E5=AD=97?= =?UTF-8?q?=E6=AE=B5=E4=B8=BA=20mode?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Http/Controllers/Admin/GameHistoryController.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/Http/Controllers/Admin/GameHistoryController.php b/app/Http/Controllers/Admin/GameHistoryController.php index a95502a..2ebc7c9 100644 --- a/app/Http/Controllers/Admin/GameHistoryController.php +++ b/app/Http/Controllers/Admin/GameHistoryController.php @@ -87,8 +87,8 @@ class GameHistoryController extends Controller // 五子棋 $gomoku = [ 'total_games' => GomokuGame::query()->count(), - 'pvp_count' => GomokuGame::query()->where('is_pvp', true)->count(), - 'pve_count' => GomokuGame::query()->where('is_pvp', false)->count(), + 'pvp_count' => GomokuGame::query()->where('mode', 'pvp')->count(), + 'pve_count' => GomokuGame::query()->where('mode', 'pve')->count(), 'today_games' => GomokuGame::query()->whereDate('created_at', today())->count(), ]; @@ -299,8 +299,8 @@ class GameHistoryController extends Controller { $summary = [ 'total_games' => GomokuGame::query()->count(), - 'pvp_count' => GomokuGame::query()->where('is_pvp', true)->count(), - 'pve_count' => GomokuGame::query()->where('is_pvp', false)->count(), + 'pvp_count' => GomokuGame::query()->where('mode', 'pvp')->count(), + 'pve_count' => GomokuGame::query()->where('mode', 'pve')->count(), 'completed' => GomokuGame::query()->where('status', 'finished')->count(), 'today_games' => GomokuGame::query()->whereDate('created_at', today())->count(), ];