You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
How can I filter the options coming in the role select field? For example, I have two roles created but I only want to show a single role option based on a condition in the select field?
RoleSelect::make('Role', 'roles'),
This is the code that is getting all the roles. I've tried many things but none has done the work.
The same goes for the permissions. how can I show only some selected permission based on a condition?
code for permissions:
PermissionBooleanGroup::make('Permissions'),
Any help would be highly appreciated. Thanks
The text was updated successfully, but these errors were encountered:
Technically this still is subject for manipulation by the user just by altering the request payload, maybe I'll add more protection in a future PR, but for something like 5 minutes of effort, this is worth it.
Easiest way is to just extend the RoleBooleanGroup class to inject a new public withOptions() method.
How can I filter the options coming in the role select field? For example, I have two roles created but I only want to show a single role option based on a condition in the select field?
RoleSelect::make('Role', 'roles'),
This is the code that is getting all the roles. I've tried many things but none has done the work.
The same goes for the permissions. how can I show only some selected permission based on a condition?
code for permissions:
PermissionBooleanGroup::make('Permissions'),
Any help would be highly appreciated. Thanks
The text was updated successfully, but these errors were encountered: