Current state in Select field

Hi, I am trying to disable a field while another field is not set.
Forms\Components\Select::make('room_id')
->label(__('Zimmer'))
->relationship('room')
->required()
->searchable()
->preload()
->disabled(fn(array $state) => ...),
Forms\Components\Select::make('room_id')
->label(__('Zimmer'))
->relationship('room')
->required()
->searchable()
->preload()
->disabled(fn(array $state) => ...),
but array $state is not working since it's injected with null and that's wrong. πŸ˜…
1 Reply
alexanderkroneis
alexanderkroneisOPβ€’15mo ago
Ah, ignore it. I'll use $get().
Want results from more Discord servers?
Add your server