Althinect/filament-spatie-roles-permissions

Cannot casts roles.name field with enums

Closed this issue ยท 2 comments

When add at Role model:

protected $casts = ['name' => EnumsRole::class];

suddenly 'Super Admin' cannot access everything, but another Role can.

// Role model
Screenshot 2024-06-19 at 08 38 36

// Enums class
Screenshot 2024-06-19 at 08 39 01

The issue which you are facing does not fall within the scope of this package.

This should help you with some debugging

https://spatie.be/docs/laravel-permission/v6/basic-usage/enums

Also I do have a small request; can you please paste you code in code blocks instead of an image? If someone has to try/test out the code, it will really be easy to copy paste the code block.

Thanks!

thank's you give me clue, should rename from "SUPER ADMIN" to "SUPERADMIN. cannot use space ๐Ÿ˜„๐Ÿ˜„