fix box 1
This commit is contained in:
1 parent
4ec3a86c9e
commit
c49f5e2364
7 files changed
+230
-194
No files matched your search
@@ -11,18 +11,23 @@ class LoadSeasons
|
||||
// $res = CompetitionGroup::with('country')->where('id', $league_id)->first();
|
||||
// $season_mode = $res->country->season_mode;
|
||||
|
||||
$res = StatistikoEvent::select('season')->where('league_id', $league_id)->get();
|
||||
// $res = StatistikoEvent::query()->where('league_id', $league_id)->get();
|
||||
|
||||
if (! $res) {
|
||||
return [];
|
||||
}
|
||||
// if (! $res) {
|
||||
// return [];
|
||||
// }
|
||||
|
||||
// $arr = [];
|
||||
// foreach ($res as $val) {
|
||||
// $arr[$val->season] = $val->season;
|
||||
// }
|
||||
|
||||
// asort($arr);
|
||||
|
||||
$arr = [];
|
||||
foreach ($res as $val) {
|
||||
$arr[$val->season] = $val->season;
|
||||
}
|
||||
|
||||
asort($arr);
|
||||
$arr['24/25'] = '24/25';
|
||||
$arr['25/26'] = '25/26';
|
||||
$arr['26/27'] = '26/27';
|
||||
|
||||
return $arr;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user