Delete option inside select field

Select::make('roles')
// ->createOptionForm(function(Form $form){
// return RoleResource::form($form);
// })
->editOptionForm(function(Form $form){
return RoleResource::form($form);
})
// ->manageOptionActions(function(){
// return [
// DeleteAction::make('delete')
// ];
// })
// ->getEditOptionActionForm()
->label(__('Role'))
->relationship('roles', 'name')
// ->multiple()
->preload()
->searchable()
->options(function () {
return Role::all()->pluck('name', 'id')->map(function ($role) {
return ucwords(str_replace('_', ' ', $role));
})->toArray();
}),
Select::make('roles')
// ->createOptionForm(function(Form $form){
// return RoleResource::form($form);
// })
->editOptionForm(function(Form $form){
return RoleResource::form($form);
})
// ->manageOptionActions(function(){
// return [
// DeleteAction::make('delete')
// ];
// })
// ->getEditOptionActionForm()
->label(__('Role'))
->relationship('roles', 'name')
// ->multiple()
->preload()
->searchable()
->options(function () {
return Role::all()->pluck('name', 'id')->map(function ($role) {
return ucwords(str_replace('_', ' ', $role));
})->toArray();
}),
is there a way i can add a delete option inside the select filed or remove that i got the edit action working but wont find any solution for remove
No description
0 Replies
No replies yetBe the first to reply to this messageJoin