createOptionForm()

when i create resource from createOptionForm getting error in my form i have hidden field
Select::make('hospital_id')
->hidden(function () use ($hospitalId) {
return $hospitalId !== null;
})
->label(__('Hospital'))
->relationship('hospital', 'name')
->required()
->visible(fn () => Auth::user()->isSuperAdmin()),
when i fill this field its fine
Screenshot_2024-05-01_at_3.28.35_AM.png
Was this page helpful?