wip fix
This commit is contained in:
1 parent
9bcd4432c6
commit
6f92f9e1d5
1209 files changed
+220940
No files matched your search
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
namespace App\Actions;
|
||||
|
||||
use App\Models\StatisticFixtures;
|
||||
|
||||
class LoadStatisticFixturesLeaguesOptions
|
||||
{
|
||||
public static function load(?int $sofascore_category_id = 0)
|
||||
{
|
||||
$res = StatisticFixtures::with('league')
|
||||
->whereHas('league', function ($query) use ($sofascore_category_id) {
|
||||
$query->where('sofa_score_category_id', $sofascore_category_id);
|
||||
})
|
||||
->get();
|
||||
|
||||
$arr = [];
|
||||
foreach ($res as $value) {
|
||||
$arr[$value->league_id] = $value->league->name;
|
||||
}
|
||||
|
||||
return $arr;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user