This commit is contained in:
salam committed 2026-05-21 18:12:30 +02:00
1 parent 0ee571ea22
commit 3743b72f71
3 files changed
+281 -27

No files matched your search

-25
View File
@@ -50,15 +50,6 @@ class LoadEvents
break;
}
$accuracy = (float) $filter['accuracy'];
$exp_home = $res['exp_home'] ?? 0;
$exp_home_from = $exp_home - $accuracy;
$exp_home_to = $exp_home + $accuracy;
$exp_away = $res['exp_away'] ?? 0;
$exp_away_from = $exp_away - $accuracy;
$exp_away_to = $exp_away + $accuracy;
$start = $filter['start_date'] ?? 0;
$end = $filter['end_date'] ?? 0;
@@ -67,10 +58,6 @@ class LoadEvents
$statistic_type = $filter['statistic_type'] ?? 0;
// 'none' => 'None',
// 'league' => 'League',
// 'all' => 'All Database',
/**
* STATTISTIC DATA
*/
@@ -78,7 +65,6 @@ 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])
->when($start, function ($query) use ($start) {
return $query->where('starttime', '>=', $start);
})->when($end, function ($query) use ($end) {
@@ -90,7 +76,6 @@ 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])
->when($start, function ($query) use ($start) {
return $query->where('starttime', '>=', $start);
})->when($end, function ($query) use ($end) {
@@ -104,9 +89,6 @@ 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]);
// })
->when($start, function ($query) use ($start) {
return $query->where('starttime', '>=', $start);
})->when($end, function ($query) use ($end) {
@@ -126,13 +108,6 @@ class LoadEvents
foreach ($res as $value) {
$labels[] = $value['starttime']->format('d. M.y');
// dd($filter);
// $tmp['exp_handicap'] = (float) $value['exp_handicap'];
// $tmp['exp_total'] = (float) $value['exp_total'];
// $tmp['exp_away'] = (float) $value['exp_away'];
// $tmp['exp_home'] = (float) $value['exp_home'];
if ($team_position == 'home') {
switch ($statistic_type) {