wip
This commit is contained in:
1 parent
6cf72a83f4
commit
e01400d65b
5 files changed
+62
-10
No files matched your search
@@ -66,15 +66,21 @@ class LoadEvents
|
||||
$handicap_range = 0;
|
||||
$total_range = 0;
|
||||
if ($similar_past_matches != 'none') {
|
||||
$res = StatisticFixtures::where('id', (int) $match_id)->first();
|
||||
$match = StatisticFixtures::with('home')->with('away')->where('id', (int) $match_id)->first();
|
||||
|
||||
$exp_handicap = $res->exp_away - $res->exp_home;
|
||||
$exp_handicap = $match->exp_away - $match->exp_home;
|
||||
|
||||
$exp_total = $res->exp_away + $res->exp_home;
|
||||
$exp_total = $match->exp_away + $match->exp_home;
|
||||
|
||||
$handicap_range = [$exp_handicap - $accuracy, $exp_handicap + $accuracy];
|
||||
|
||||
$total_range = [$exp_total - $accuracy, $exp_total + $accuracy];
|
||||
|
||||
$home_team = $match->home->name;
|
||||
$away_team = $match->away->name;
|
||||
} else {
|
||||
$home_team = 'Home';
|
||||
$away_team = 'Away';
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -385,6 +391,8 @@ class LoadEvents
|
||||
'labels' => $labels,
|
||||
'description' => $description ?? '',
|
||||
'results' => $results,
|
||||
'home_team' => $home_team,
|
||||
'away_team' => $away_team,
|
||||
];
|
||||
|
||||
self::$last_query = $data;
|
||||
|
||||
Reference in new issue
Block a user