fix(chat): 修正五子棋查询状态字段为 mode
This commit is contained in:
@@ -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(),
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user