initial commit
This commit is contained in:
17
app/Enums/UserRole.php
Normal file
17
app/Enums/UserRole.php
Normal file
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
namespace App\Enums;
|
||||
|
||||
enum UserRole: string
|
||||
{
|
||||
case Admin = 'admin';
|
||||
case Customer = 'customer';
|
||||
|
||||
public function label(): string
|
||||
{
|
||||
return match ($this) {
|
||||
self::Admin => 'Administrator',
|
||||
self::Customer => 'Kunde',
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user