@php
use App\Http\Controllers\Admin\SystemController;
$krxValidationRequired = SystemController::isValidationEnabled();
@endphp
Admin - Gerenciar Partidas - GIGAX ARENA
@php
$currentUser = DB::selectOne("
SELECT TOP 1 nickname, email, avatar_url, role
FROM users
WHERE id = ?
", [session('user_id')]);
$currentUserRole = $currentUser->role ?? 'user';
$isAdmin = $currentUserRole === 'admin';
$isModerator = in_array($currentUserRole, ['admin', 'moderator']);
$activeMatchesCount = DB::selectOne("
SELECT COUNT(*) AS total
FROM mix_training_matches
WHERE status IN ('in_progress', 'started', 'veto', 'waiting')
");
$historyCount = DB::selectOne("
SELECT COUNT(*) AS total
FROM mix_match_history
");
$adminLogsCount = DB::selectOne("
SELECT COUNT(*) AS total
FROM admin_action_logs
");
$krxValidationRequired = config('krux.validation_required', true);
$todayClosedCount = DB::selectOne("
SELECT COUNT(*) AS total
FROM mix_match_history
WHERE CAST(completed_at AS DATE) = CAST(GETDATE() AS DATE)
");
@endphp