diff --git a/app/Filament/Resources/RoleResource.php b/app/Filament/Resources/RoleResource.php index 4edb480515..efe4ea418c 100644 --- a/app/Filament/Resources/RoleResource.php +++ b/app/Filament/Resources/RoleResource.php @@ -40,10 +40,10 @@ public static function form(Form $form): Form $options = []; foreach (RolePermissionPrefixes::cases() as $prefix) { - $options[$prefix->value . ' ' . strtolower($model->value)] = Str::headline($prefix); + $options[$prefix->value . ' ' . strtolower($model->value)] = Str::headline($prefix->value); } - if (array_key_exists($model, Role::MODEL_SPECIFIC_PERMISSIONS)) { + if (array_key_exists($model->value, Role::MODEL_SPECIFIC_PERMISSIONS)) { foreach (Role::MODEL_SPECIFIC_PERMISSIONS[$model] as $permission) { $options[$permission . ' ' . strtolower($model->value)] = Str::headline($permission); }