From b89372e0c2b3ebab130171ce44231ce6ceb94bcc Mon Sep 17 00:00:00 2001 From: salam Date: Sat, 10 Oct 2026 12:37:10 +0200 Subject: [PATCH] wip --- app/Filament/Widgets/PlayerPropsDrop.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/Filament/Widgets/PlayerPropsDrop.php b/app/Filament/Widgets/PlayerPropsDrop.php index 2a8612c2..59df875e 100644 --- a/app/Filament/Widgets/PlayerPropsDrop.php +++ b/app/Filament/Widgets/PlayerPropsDrop.php @@ -389,11 +389,11 @@ class PlayerPropsDrop extends Widget $team_home_away = 'away'; } - $player_totals = SofaScorePlayerPerSeason::with('details')->where('total_min', '>', 0)->where('season', 'last_180_days')->where('ss_team_id', $team_id)->get(); + $player_totals = SofaScorePlayerPerSeason::with('details')->where('total_min', '>', 0)->where('season', 'last_180_days')->where('average_min', '>', 0)->where('ss_team_id', $team_id)->get(); $count_player = 0; foreach ($player_totals as $key => $value) { - if ($value->details != null && $value->details->position != 'GK' && (int) $value->details->is_active != 0) { + if ($value->details != null && $value->details->position != 'GK' && (int) $value->details->is_active) { $count_player++; } } @@ -401,7 +401,7 @@ class PlayerPropsDrop extends Widget $results = []; foreach ($player_totals as $val) { - if ($val->details != null && $val->details->position != 'GK' && (int) $val->details->is_active != 0) { + if ($val->details != null && $val->details->position != 'GK' && (int) $val->details->is_active) { /*** "goals" => 0 @@ -679,7 +679,7 @@ class PlayerPropsDrop extends Widget public function prepareLineUp() { - $players = SofaScorePlayerPerSeason::with('details')->where('season', 'last_180_days')->where('ss_team_id', $this->team_id)->get(); + $players = SofaScorePlayerPerSeason::with('details')->where('season', 'last_180_days')->where('ss_team_id', $this->team_id)->where('average_min', '>', 0)->get(); $arr = collect(); foreach ($players as $value) { if ($value?->details->position ?? 0) {