Forms\Components\Repeater::make('clientLocations')
->label(__('Locations'))
->live()
->relationship()
->orderColumn('order')
->simple(
Forms\Components\Select::make('location_id')
->live()
->relationship('location', 'name', function (Builder $query, Get $get) {
Log::info(json_encode($get('../../clientLocations')));
return $query->whereNotIn('id',array_column($get('../../clientLocations'), 'location_id'));
})
->required()
),
Forms\Components\Repeater::make('clientLocations')
->label(__('Locations'))
->live()
->relationship()
->orderColumn('order')
->simple(
Forms\Components\Select::make('location_id')
->live()
->relationship('location', 'name', function (Builder $query, Get $get) {
Log::info(json_encode($get('../../clientLocations')));
return $query->whereNotIn('id',array_column($get('../../clientLocations'), 'location_id'));
})
->required()
),