diff --git a/app/Livewire/MapperLeft.php b/app/Livewire/MapperLeft.php index 07d8364e..0d6a2d7f 100644 --- a/app/Livewire/MapperLeft.php +++ b/app/Livewire/MapperLeft.php @@ -98,20 +98,20 @@ class MapperLeft extends Component implements HasActions, HasSchemas, HasTable ->columns(4) ->schema([ FusedGroup::make([ - // Select::make('country_id') - // ->placeholder('Country') - // ->hiddenLabel() - // ->searchable() - // ->preload() - // ->options(function () { - // $res = Event::query()->where('sport_id', auth()->user()->sport_id)->where('betradar_id', 0)->where('starttime', '>', Carbon::now())->groupBy('country_id')->pluck('country_id')->toArray(); + Select::make('country_id') + ->placeholder('Country') + ->hiddenLabel() + ->searchable() + ->preload() + ->options(function () { + $res = Event::query()->where('sport_id', auth()->user()->sport_id)->where('betradar_id', 0)->where('starttime', '>', Carbon::now())->groupBy('country_id')->pluck('country_id')->toArray(); - // return Country::query()->whereIn('id', $res)->orderBy('name')->pluck('name', 'id'); - // }) - // ->afterStateUpdated(function (callable $set) { - // $set('competition_group_id', null); - // }) - // ->live(), + return Country::query()->whereIn('id', $res)->orderBy('name')->pluck('name', 'id'); + }) + ->afterStateUpdated(function (callable $set) { + $set('competition_group_id', null); + }) + ->live(), // Select::make('competition_group_id') // ->placeholder('League') // ->hiddenLabel()