# Permissions Enums This directory contains all the permissions enums. Spatie/laravel-permission uses these enums to check permissions. Any Permission enum added here will be automatically added to the database, when the [PermissionSeeder](../../../database/seeders/PermissionSeeder.php) is run, no need to add it manually. This is done via Reflection API. `Only string backed are supported.` ## Value format of Enum We are following the convention of `scope:resource:action` . **File name** of the enum should be same as the **scope name**, and Enum *value* should be in the format of *resource:action*. Example: UserPermissionEnum.php ```php namespace App\Enums\Permissions; enum UserPermissionEnum:string { case Create = 'user:create'; case Read = 'user:read'; case Update = 'user:update'; case Delete = 'user:delete'; } // using the enum makes straight forward permission check $user->can(UserPermissionEnum::Create); @can(UserPermissionEnum::Create); ```