diff --git a/src/Resources/RoleResource.php b/src/Resources/RoleResource.php index 5ee9102..27c6417 100644 --- a/src/Resources/RoleResource.php +++ b/src/Resources/RoleResource.php @@ -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