Skip to content

Commit

Permalink
Update RoleResource (#166)
Browse files Browse the repository at this point in the history
  • Loading branch information
fsamapoor authored Feb 27, 2024
1 parent 9ba1c34 commit d03a7ba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Resources/RoleResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ public static function form(Form $form): Form
->label(__('filament-spatie-roles-permissions::filament-spatie.field.permissions'))
->relationship(
name: 'permissions',
modifyQueryUsing: fn (Builder $query) => $query->orderBy('name')->orderBy('name'),
modifyQueryUsing: fn (Builder $query) => $query->orderBy('name'),
)
->getOptionLabelFromRecordUsing(fn (Model $record) => "{$record->name} ({$record->guard_name})")
->searchable(['name', 'guard_name']) // searchable on both name and guard_name
Expand Down

0 comments on commit d03a7ba

Please sign in to comment.