wip
This commit is contained in:
1 parent
0a09953bdd
commit
89cb571b56
7 files changed
+23
-60
No files matched your search
@@ -8,16 +8,17 @@ use App\Models\StatistikoEvent;
|
||||
|
||||
class AverageLeagueSeason
|
||||
{
|
||||
/**
|
||||
* BOX 6 - AVERAGE ALL LEAGUE FIXED TO ACTIVE SEASON
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public static function load(array &$expectations, array $filter)
|
||||
{
|
||||
$tournament_id = (int) $filter['league_id'] ?? 0;
|
||||
$seasonmode = $filter['seasonmode'];
|
||||
$active_season = GetSeason::active($seasonmode);
|
||||
|
||||
// Box 2
|
||||
// average made and got for liga selected
|
||||
// fixed to active season
|
||||
|
||||
$res = StatistikoEvent::where('league_id', $tournament_id)
|
||||
->when($active_season, function ($query) use ($active_season) {
|
||||
return $query->where('season', $active_season);
|
||||
|
||||
Reference in new issue
Block a user