Closed quasiperfect closed 2 years ago
change:
BelongsToManyMultiSelect::make('roles')
->relationship('roles', 'name')
->preload(config('filament-authentication.preload_roles'))
->label(strval(__('filament-authentication::filament-authentication.field.user.roles')))
to
BelongsToManyMultiSelect::make('roles')
->relationship('roles', 'name')
->preload(config('filament-authentication.preload_roles'))
->label(strval(__('filament-authentication::filament-authentication.field.user.roles')))
->maxItems(1)
Can I customize the message "Only 1 can be selected" ?
hi
thanks for your work
if there any method to force the selection of only one role ? i tried to change the BelongsToManyMultiSelect to BelongsToSelect but i get a error