wip
This commit is contained in:
1 parent
fc18f98fd8
commit
c329d5a6f5
5 files changed
+33
-38
No files matched your search
@@ -47,7 +47,7 @@ class LoadEvents
|
||||
if (! $match_id) {
|
||||
return [];
|
||||
}
|
||||
if (! $team_id && $similar_past_matches != 'none') {
|
||||
if (! $team_id && $similar_past_matches == 'none') {
|
||||
return [];
|
||||
}
|
||||
|
||||
@@ -64,7 +64,7 @@ class LoadEvents
|
||||
*/
|
||||
$handicap_range = 0;
|
||||
$total_range = 0;
|
||||
if ($similar_past_matches != 'none' && isset($res)) {
|
||||
if ($similar_past_matches != 'none') {
|
||||
$res = StatisticFixtures::where('id', (int) $match_id)->first();
|
||||
|
||||
$exp_handicap = $res->exp_away - $res->exp_home;
|
||||
@@ -103,8 +103,7 @@ class LoadEvents
|
||||
/**
|
||||
* STATTISTIC DATA
|
||||
*/
|
||||
$res = StatistikoEvent::with('home')
|
||||
->with('away')
|
||||
$res = StatistikoEvent::with('home')->with('away')
|
||||
->where(function ($query) use ($league_id, $similar_past_matches) {
|
||||
switch ($similar_past_matches) {
|
||||
case 'none':
|
||||
@@ -148,18 +147,8 @@ class LoadEvents
|
||||
$labels = [];
|
||||
$events = [];
|
||||
$labels_since = [];
|
||||
// win in favor (w) against (w2)
|
||||
// draw in favor (d) against (d2)
|
||||
// lost in favor (l) against (l2)
|
||||
$results = ['w' => 0, 'd' => 0, 'l' => 0, 'w2' => 0, 'l2' => 0];
|
||||
|
||||
/**
|
||||
* IF WITH PLAYER
|
||||
*/
|
||||
// $res = StatisticFixtures::with('home')->with('away')->where('id', (int) $match_id)->first();
|
||||
// $event = $res->home->name.' vs '.$res->away->name;
|
||||
// dd($event);
|
||||
|
||||
foreach ($res as $value) {
|
||||
|
||||
$labels[] = $value['starttime']->format('d.M.Y H:i');
|
||||
|
||||
Reference in new issue
Block a user