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(), ->live(),
])->hidden(fn () => auth()->user()->sport_id == 5)->columnSpan(2), ])->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) ->visible(fn () => auth()->user()->sport_id == 5)
->placeholder('Tournament') ->placeholder('Tournament')
->prefixIcon('phosphor-trophy') ->prefixIcon('phosphor-trophy')
@@ -254,14 +254,14 @@ class EventsTable
->searchable() ->searchable()
->options(function () { ->options(function () {
$res = Event::where('has_markets', 1) $res = Event::where('has_markets', 1)
->with('group') ->with('competition_group')
->where('sport_id', auth()->user()->sport_id) ->where('sport_id', auth()->user()->sport_id)
->where('starttime', '>', Carbon::now()) ->where('starttime', '>', Carbon::now())
->groupBy('group_id') ->groupBy('competition_group_id')
->get(); ->get();
$arr = []; $arr = [];
foreach ($res as $val) { foreach ($res as $val) {
$arr[$val->group_id] = $val->group->name; $arr[$val->competition_group_id] = $val->competition_group->name;
} }
asort($arr); asort($arr);