Init
This commit is contained in:
15
apps/backend/app/Enums/RolesEnum.php
Normal file
15
apps/backend/app/Enums/RolesEnum.php
Normal file
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
namespace App\Enums;
|
||||
|
||||
enum RolesEnum: string
|
||||
{
|
||||
case SUPERADMIN = 'super-admin';
|
||||
|
||||
// extra helper to allow for greater customization of displayed values, without disclosing the name/value data directly
|
||||
public function label(): string
|
||||
{
|
||||
return match ($this) {
|
||||
static::SUPERADMIN => 'Super Admin',
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user