This commit is contained in:
salam committed 2026-08-30 17:17:44 +02:00
1 parent c49f5e2364
commit a794f6a384
2 files changed
+5 -3

No files matched your search

@@ -8,7 +8,7 @@ class GetSeason
{
public static function load(array $season, int|null $sofascore_category_id)
{
if (!$season) {
if (!is_array($season) || !count($season)) {
if ($sofascore_category_id) {
$season_mode = SofaScoreCategory::where('id', $sofascore_category_id)->value('season_mode');
if ($season_mode == 'halfyear') {
@@ -17,6 +17,9 @@ class GetSeason
else
$season[] = date('y', strtotime('-1 year')) . '/' . date('y');
}
else {
$season[] = date('Y');
}
}
}
+1 -2
View File
@@ -13,11 +13,9 @@ class LoadPlayer
public static function load(Get $get)
{
$team_id = $get('team_id');
$team_position = $get('team_position');
$sofascore_category_id = $get('sofascore_category_id');
$season = $get('season');
$season = GetSeason::load($season, $sofascore_category_id);
$matches = StatistikoEvent::whereIn('season', $season)
@@ -33,6 +31,7 @@ class LoadPlayer
}
})->pluck('match_id')->toArray();
$matches_count = count($matches);
$positions_map = LoadPositions::load();