wip
This commit is contained in:
1 parent
4dccc528cc
commit
6365f60151
2 files changed
+7
-2
No files matched your search
@@ -7,7 +7,7 @@ use App\Models\StatistikoEvent;
|
|||||||
|
|
||||||
class Expectations
|
class Expectations
|
||||||
{
|
{
|
||||||
public static function load(int $team_id)
|
public static function load(int $team_id, int $count_player)
|
||||||
{
|
{
|
||||||
$bettypes = ['gls', 'fls', 'ofs', 'crd', 'snt', 'tsh'];
|
$bettypes = ['gls', 'fls', 'ofs', 'crd', 'snt', 'tsh'];
|
||||||
$data = StatistikoEvent::where(function ($query) use ($team_id) {
|
$data = StatistikoEvent::where(function ($query) use ($team_id) {
|
||||||
@@ -70,6 +70,11 @@ class Expectations
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
foreach ($finals as $key => $value) {
|
||||||
|
$finals[$key]['home'] = $value['home'] * $count_player / 10;
|
||||||
|
$finals[$key]['away'] = $value['away'] * $count_player / 10;
|
||||||
|
}
|
||||||
|
|
||||||
return $finals;
|
return $finals;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -487,7 +487,7 @@ class PlayerPropsDrop extends Widget
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$asp_team_all = Expectations::load($team_id);
|
$asp_team_all = Expectations::load($team_id, $count_player);
|
||||||
|
|
||||||
// Aspettativa Team di Riferimento
|
// Aspettativa Team di Riferimento
|
||||||
// (ATR) = Aspettativa Team * Numero di Giocatori di Team in Rosters (esclusi i portieri) / 10.
|
// (ATR) = Aspettativa Team * Numero di Giocatori di Team in Rosters (esclusi i portieri) / 10.
|
||||||
|
|||||||
Reference in new issue
Block a user