diff --git a/app/Filament/Resources/Events/Tables/EventsTable.php b/app/Filament/Resources/Events/Tables/EventsTable.php index e29b9cf4..18202f32 100644 --- a/app/Filament/Resources/Events/Tables/EventsTable.php +++ b/app/Filament/Resources/Events/Tables/EventsTable.php @@ -252,28 +252,16 @@ class EventsTable ->label('') ->multiple() ->searchable() - ->options(function (Get $get) { - if ($get('country_id')) { - $res = Event::where('has_markets', 1) - ->with('country') - ->with('group') - ->where('sport_id', auth()->user()->sport_id) - ->where('country_id', $get('country_id')) - ->where('starttime', '>', Carbon::now()) - ->groupBy('group_id') - ->get(); - } else { - $res = Event::where('has_markets', 1) - ->with('country') - ->with('group') - ->where('sport_id', auth()->user()->sport_id) - ->where('starttime', '>', Carbon::now()) - ->groupBy('group_id') - ->get(); - } + ->options(function () { + $res = Event::where('has_markets', 1) + ->with('group') + ->where('sport_id', auth()->user()->sport_id) + ->where('starttime', '>', Carbon::now()) + ->groupBy('group_id') + ->get(); $arr = []; foreach ($res as $val) { - $arr[$val->group_id] = $val->country?->name.' '.$val->group->name; + $arr[$val->group_id] = $val->group->name; } asort($arr);