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); })