Skip to content

Commit

Permalink
Update RoleResource.php
Browse files Browse the repository at this point in the history
  • Loading branch information
tharindarodrigo authored Aug 17, 2024
1 parent 0fb1a3e commit b65fda2
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/Resources/RoleResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ public static function form(Form $form): Form
name: 'permissions',
modifyQueryUsing: fn (Builder $query) => $query->orderBy('name'),
)
->visible(config('filament-spatie-roles-permissions.should_show_permissions_for_roles'))
->getOptionLabelFromRecordUsing(fn (Model $record) => "{$record->name} ({$record->guard_name})")
->searchable(['name', 'guard_name']) // searchable on both name and guard_name
->preload(config('filament-spatie-roles-permissions.preload_permissions')),
Expand Down

0 comments on commit b65fda2

Please sign in to comment.