From 2ef3ef9f7f9ca3341a09247a6848fb270d64b023 Mon Sep 17 00:00:00 2001 From: salam Date: Fri, 25 Sep 2026 11:42:32 +0200 Subject: [PATCH] wip --- app/Filament/Widgets/Boxes/ExpectationsTeam.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/app/Filament/Widgets/Boxes/ExpectationsTeam.php b/app/Filament/Widgets/Boxes/ExpectationsTeam.php index a3c7b82b..66f90e1a 100644 --- a/app/Filament/Widgets/Boxes/ExpectationsTeam.php +++ b/app/Filament/Widgets/Boxes/ExpectationsTeam.php @@ -29,6 +29,7 @@ class ExpectationsTeam } $res = LoadEventsQueryAll::load($filter, $match); + $count_events = $res->count(); if (! $res) { return []; } @@ -53,10 +54,8 @@ class ExpectationsTeam $expectations['away'] = $away_team; $expectations += ['win_count' => 0, 'draw_count' => 0, 'lost_count' => 0]; - $count_events = 0; foreach ($res as $value) { if ($team_id && $team_position == 'home') { - $count_events++; switch ($value['result_code']) { case '1': $expectations['win_count']++; @@ -70,7 +69,6 @@ class ExpectationsTeam } } elseif ($team_id && $team_position == 'away') { - $count_events++; switch ($value['result_code']) { case '1': $expectations['win_count']++; @@ -84,7 +82,6 @@ class ExpectationsTeam } } else { - $count_events++; switch ($value['result_code']) { case '1': $expectations['win_count']++;