From 4f7de2e4898006f3b4e4a910cca91f1c5bacdf9b Mon Sep 17 00:00:00 2001 From: salam Date: Sat, 1 Aug 2026 12:34:01 +0200 Subject: [PATCH] wip --- app/Console/Commands/Grapper/Sofascore/PlayerPerSeason.php | 5 +++-- app/Filament/Pages/Statistic.php | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/Console/Commands/Grapper/Sofascore/PlayerPerSeason.php b/app/Console/Commands/Grapper/Sofascore/PlayerPerSeason.php index e113edbe..3f2299e9 100644 --- a/app/Console/Commands/Grapper/Sofascore/PlayerPerSeason.php +++ b/app/Console/Commands/Grapper/Sofascore/PlayerPerSeason.php @@ -27,14 +27,15 @@ class PlayerPerSeason $res2 = StatistikoPlayer::with('event')->where('ss_player_id', $val->ss_player_id)->get(); foreach ($res2 as $val2) { - dd($val2); + if (!isset($collection[$val2->event->season])) { $collection[$val2->event->season]['events_played_home'] = 0; $collection[$val2->event->season]['events_played_away'] = 0; $collection[$val2->event->season]['minutes_played_home'] = 0; $collection[$val2->event->season]['minutes_played_away'] = 0; } - if ($val2->minutes_played > 0) { + + if ((int) $val2->minutes_played > 0) { if ($val2->activeteam_id == $val2->event->home_id) { $collection[$val2->event->season]['events_played_home'] += 1; diff --git a/app/Filament/Pages/Statistic.php b/app/Filament/Pages/Statistic.php index c103d2a6..44814013 100644 --- a/app/Filament/Pages/Statistic.php +++ b/app/Filament/Pages/Statistic.php @@ -199,7 +199,7 @@ class Statistic extends BaseDashboard ->default('none') ->selectablePlaceholder(false) ->afterStateUpdated(function (callable $set) { - $set('team_id', null); + // $set('team_id', null); $set('ss_player_id', null); $set('team_position', null); })