diff --git a/app/Actions/Statistics/LoadEvents.php b/app/Actions/Statistics/LoadEvents.php index 15214f08..e0bc9bda 100644 --- a/app/Actions/Statistics/LoadEvents.php +++ b/app/Actions/Statistics/LoadEvents.php @@ -63,6 +63,14 @@ class LoadEvents $end = $filter['end_date'] ?? 0; + $similar_past_matches = $filter['similar_past_matches'] ?? 0; + + $statistic_type = $filter['statistic_type'] ?? 0; + + // 'none' => 'None', + // 'league' => 'League', + // 'all' => 'All Database', + /** * STATTISTIC DATA */ @@ -70,7 +78,7 @@ class LoadEvents case 'home': $res = StatistikoEvent::where('league_id', $league_id) ->where('home_id', '=', $team_id) - ->whereBetween('exp_home', [$exp_home_from, $exp_home_to]) + // ->whereBetween('exp_home', [$exp_home_from, $exp_home_to]) ->when($start, function ($query) use ($start) { return $query->where('starttime', '>=', $start); })->when($end, function ($query) use ($end) { @@ -82,7 +90,7 @@ class LoadEvents case 'away': $res = StatistikoEvent::where('league_id', $league_id) ->where('away_id', '=', $team_id) - ->whereBetween('exp_away', [$exp_away_from, $exp_away_to]) + // ->whereBetween('exp_away', [$exp_away_from, $exp_away_to]) ->when($start, function ($query) use ($start) { return $query->where('starttime', '>=', $start); })->when($end, function ($query) use ($end) { @@ -96,9 +104,9 @@ class LoadEvents ->where(function ($query) use ($team_id) { $query->where('home_id', '=', $team_id)->orWhere('away_id', '=', $team_id); }) - ->where(function ($query) use ($exp_home_from, $exp_home_to, $exp_away_from, $exp_away_to) { - $query->whereBetween('exp_home', [$exp_home_from, $exp_home_to])->orWhereBetween('exp_away', [$exp_away_from, $exp_away_to]); - }) + // ->where(function ($query) use ($exp_home_from, $exp_home_to, $exp_away_from, $exp_away_to) { + // $query->whereBetween('exp_home', [$exp_home_from, $exp_home_to])->orWhereBetween('exp_away', [$exp_away_from, $exp_away_to]); + // }) ->when($start, function ($query) use ($start) { return $query->where('starttime', '>=', $start); })->when($end, function ($query) use ($end) {