diff --git a/app/Actions/Statistics/LoadEventsAspGoal.php b/app/Actions/Statistics/LoadEventsAspGoal.php index 4a3acd93..40a08cfc 100644 --- a/app/Actions/Statistics/LoadEventsAspGoal.php +++ b/app/Actions/Statistics/LoadEventsAspGoal.php @@ -90,17 +90,19 @@ class LoadEventsAspGoal break; case 'none': - dd('none'); $res = StatistikoEvent::when($league_id, function ($query) use ($league_id) { return $query->where('league_id', $league_id); })->when($team_id, function ($query) use ($team_id, $team_position) { switch ($team_position) { case 'home': return $query->where('home_id', $team_id); + break; case 'away': return $query->where('away_id', $team_id); + break; default: return $query->where('home_id', '=', $team_id)->orWhere('away_id', '=', $team_id); + break; } })->when($start, function ($query) use ($start) { return $query->where('starttime', '>=', $start);