18 lines
541 B
PHP
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');
|
|
}
|
|
}
|