This commit is contained in:
salam committed 2026-02-27 14:54:03 +01:00
1 parent 6af8f0e860
commit a77bc4237b
1 file changed
+4 -4
@@ -243,7 +243,7 @@ class EventsTable
})
->live(),
])->hidden(fn () => auth()->user()->sport_id == 5)->columnSpan(2),
Select::make('group_id')
Select::make('competition_group_id')
->visible(fn () => auth()->user()->sport_id == 5)
->placeholder('Tournament')
->prefixIcon('phosphor-trophy')
@@ -254,14 +254,14 @@ class EventsTable
->searchable()
->options(function () {
$res = Event::where('has_markets', 1)
->with('group')
->with('competition_group')
->where('sport_id', auth()->user()->sport_id)
->where('starttime', '>', Carbon::now())
->groupBy('group_id')
->groupBy('competition_group_id')
->get();
$arr = [];
foreach ($res as $val) {
$arr[$val->group_id] = $val->group->name;
$arr[$val->competition_group_id] = $val->competition_group->name;
}
asort($arr);