wip
This commit is contained in:
1 parent
9bf5890441
commit
ea1acb50a9
1 file changed
+8
-1
@@ -94,10 +94,17 @@ class LoadEventsQuery
|
||||
return $query->where('league_id', $league_id);
|
||||
}
|
||||
})
|
||||
->where(function ($query) use ($team_id, $similar_past_matches) {
|
||||
->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)
|
||||
->orWhere('away_id', '=', $team_id);
|
||||
} else {
|
||||
return $query->where('home_id', '=', $home_id)
|
||||
->orWhere('away_id', '=', $home_id)
|
||||
->orWhere('home_id', '=', $away_id)
|
||||
->orWhere('away_id', '=', $away_id);
|
||||
}
|
||||
}
|
||||
})
|
||||
->when($matches_played, function ($query) use ($matches_played, $player_on_field) {
|
||||
|
||||
Reference in new issue
Block a user