Files
nuhodds_fi4/app/Actions/LoadStatisticFixturesLeaguesOptions.php
T
2026-08-25 08:03:22 +02:00

18 lines
541 B
PHP

<?php
namespace App\Actions;
use App\Models\SofaScoreTournament;
class LoadStatisticFixturesLeaguesOptions
{
public static function load(int|null $sofascore_category_id = 0)
{
// $res = StatisticFixtures::with('league')->where('league_id', $sofascore_category_id)
// ->groupBy('league_id')
// ->pluck('league_id')->toArray();
return SofaScoreTournament::where('enabled', 1)->where('sofa_score_category_id', $sofascore_category_id)->orderBy('name')->pluck('name', 'tournament_id');
}
}