Download app/Enums/Roles.php from pnacorp/magicai: direct link, hf CLI and curl.
- Browser
- Download file 474 Bytes
-
https://huggingface.co/pnacorp/magicai/resolve/main/app/Enums/Roles.php
- Command line
-
hf download hf://pnacorp/magicai/app/Enums/Roles.php
-
curl -L -o Roles.php https://huggingface.co/pnacorp/magicai/resolve/main/app/Enums/Roles.php
474 Bytes
| declare(strict_types=1); | |
| namespace App\Enums; | |
| use App\Enums\Traits\EnumTo; | |
| use App\Enums\Traits\StringBackedEnumTrait; | |
| enum Roles: string implements Contracts\WithStringBackedEnum | |
| { | |
| use EnumTo; | |
| use StringBackedEnumTrait; | |
| case USER = 'user'; | |
| case ADMIN = 'admin'; | |
| public function label(): string | |
| { | |
| return match ($this) { | |
| self::USER => __('User'), | |
| self::ADMIN => __('Admin'), | |
| }; | |
| } | |
| } | |