wip
This commit is contained in:
1 parent
36584b8de4
commit
4b39c59630
2 files changed
+1
-4
No files matched your search
@@ -54,7 +54,6 @@ class ExpectationsTeam
|
||||
ExpectationCollecting::sort($similar_past_matches, $tmp, 'crn', $value->home_id, $value->away_id, $value->crn_h, $value->crn_a, $match);
|
||||
}
|
||||
|
||||
|
||||
$expectations = ExpectationCalculation::calc($tmp);
|
||||
$expectations['gls']['name'] = 'Goals';
|
||||
$expectations['fls']['name'] = 'Fouls';
|
||||
|
||||
@@ -25,14 +25,12 @@ class LoadEventsQueryAll
|
||||
$ss_player_id = (int) $filter['ss_player_id'] ?? 0;
|
||||
$player_on_field = $filter['player_on_field'] ?? 'all';
|
||||
$similar_past_matches = $filter['similar_past_matches'];
|
||||
$team_position = $filter['team_position'];
|
||||
|
||||
$handicap_range = [];
|
||||
$total_range = [];
|
||||
if ($similar_past_matches != 'none') {
|
||||
$team_id = 0;
|
||||
$ss_player_id = 0;
|
||||
$team_position = '';
|
||||
$exp_handicap = $match->exp_away - $match->exp_home;
|
||||
$exp_total = $match->exp_away + $match->exp_home;
|
||||
$handicap_range = [$exp_handicap - $accuracy, $exp_handicap + $accuracy];
|
||||
@@ -94,7 +92,7 @@ class LoadEventsQueryAll
|
||||
return $query->where('league_id', $league_id);
|
||||
}
|
||||
})
|
||||
->where(function ($query) use ($team_id) {
|
||||
->when($team_id, function ($query) use ($team_id, $player_on_field) {
|
||||
return $query->where('home_id', '=', $team_id)
|
||||
->orWhere('away_id', '=', $team_id);
|
||||
})
|
||||
|
||||
Reference in new issue
Block a user