wip
This commit is contained in:
1 parent
60e5ce45ce
commit
12d29d6a6b
4 files changed
+45
-11
No files matched your search
@@ -7,13 +7,25 @@ use App\Models\StatistikoEvent;
|
||||
|
||||
class LoadSeasons
|
||||
{
|
||||
public static function load($league_id)
|
||||
public static function load($sofascore_category_id)
|
||||
{
|
||||
if(!$league_id){
|
||||
if(!$sofascore_category_id){
|
||||
return [];
|
||||
}
|
||||
|
||||
return StatistikoEvent::query()->where('league_id', $league_id)->groupBy('season')->pluck('season','season')->toArray();
|
||||
$season_mode = SofaScoreCategory::where('id', $sofascore_category_id)->value('season_mode');
|
||||
|
||||
$arr = [];
|
||||
if($season_mode == 'fullyear') {
|
||||
$arr[2024] = 2024;
|
||||
$arr[2025] = 2025;
|
||||
$arr[2026] = 2026;
|
||||
}else {
|
||||
$arr['24/25'] = '24/25';
|
||||
$arr['25/26'] = '25/26';
|
||||
$arr['26/27'] = '26/27';
|
||||
}
|
||||
|
||||
return $arr;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user