wiip
This commit is contained in:
1 parent
82f3654a05
commit
be4a08982e
8 files changed
+364
-326
No files matched your search
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
namespace App\Filament\Pages\Selections\Helper;
|
||||
|
||||
use App\Models\SofaScoreCategory;
|
||||
use Filament\Schemas\Components\Utilities\Get;
|
||||
|
||||
class GetSeason
|
||||
{
|
||||
public static function load(array $season, int $sofascore_category_id)
|
||||
{
|
||||
if (!$season) {
|
||||
$season_mode = SofaScoreCategory::where('id', $sofascore_category_id)->value('season_mode');
|
||||
if ($season_mode == 'halfyear') {
|
||||
if ((int) date('m') > 7)
|
||||
$season[] = date('y') . '/' . date('y', strtotime('+1 year'));
|
||||
else
|
||||
$season[] = date('y', strtotime('-1 year')) . '/' . date('y');
|
||||
}
|
||||
}
|
||||
|
||||
return $season;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user