TP for boxes and grafic wip

This commit is contained in:
salam committed 2026-10-07 11:12:01 +02:00
1 parent 1fbf53cf1f
commit 28882bfdb5
3 files changed
+28 -43

No files matched your search

@@ -48,19 +48,6 @@ class LoadEventsQueryAll
$matches_played = [];
if ($ss_player_id) {
// $matches_season = StatistikoEvent::whereIn('season', $season)
// ->where(function ($query) use ($team_id, $team_position) {
// switch ($team_position) {
// case 'home':
// return $query->where('home_id', '=', $team_id);
// case 'away':
// return $query->where('away_id', '=', $team_id);
// default:
// return $query->where('home_id', '=', $team_id)
// ->orWhere('away_id', '=', $team_id);
// }
// })->pluck('match_id')->toArray();
$matches_season = StatistikoEvent::whereIn('season', $season)
->where(function ($query) use ($team_id) {
return $query->where('home_id', '=', $team_id)
@@ -111,19 +98,6 @@ class LoadEventsQueryAll
return $query->where('home_id', '=', $team_id)
->orWhere('away_id', '=', $team_id);
})
// ->where(function ($query) use ($team_id, $similar_past_matches, $team_position) {
// if ($team_id && $similar_past_matches == 'none') {
// switch ($team_position) {
// case 'home':
// return $query->where('home_id', '=', $team_id);
// case 'away':
// return $query->where('away_id', '=', $team_id);
// default:
// return $query->where('home_id', '=', $team_id)
// ->orWhere('away_id', '=', $team_id);
// }
// }
// })
->when($matches_played, function ($query) use ($matches_played, $player_on_field) {
if ($player_on_field == 'notplayed') {
return $query->whereNotIn('match_id', $matches_played);