This commit is contained in:
salam committed 2026-08-30 05:39:11 +02:00
1 parent 68607108b4
commit 4ec3a86c9e
4 files changed
+7 -3

No files matched your search

+1 -1
View File
@@ -88,7 +88,7 @@ class LoadEvents
$team_position = 'all';
}
if (!isset($res['all'])) {
if (!isset($res['all']) || !isset($res[$team_position])) {
return [];
}
@@ -98,7 +98,7 @@ class LoadEventsQuery
->where(function ($query) use ($team_id, $home_id, $away_id, $similar_past_matches) {
if ($similar_past_matches == 'none') {
if ($team_id) {
return $query->where('home_id', $team_id)
return $query->orWhere('home_id', $team_id)
->orWhere('away_id', '=', $team_id);
} else {
return $query->whereIn('home_id', [$home_id, $away_id])->orWhereIn('away_id', [$home_id, $away_id]);