update
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
namespace App\Enums\Product;
|
||||
|
||||
enum ProductTypeEnums: string
|
||||
{
|
||||
case VPS = 'vps';
|
||||
case HOSTING = 'hosting';
|
||||
case CLOUD = 'cloud';
|
||||
case EMAIL = 'email';
|
||||
case SSL = 'ssl';
|
||||
case DOMAIN = 'domain';
|
||||
case WEB_DESIGN = 'web design';
|
||||
|
||||
public function label(): string
|
||||
{
|
||||
return match ($this) {
|
||||
self::VPS => 'VPS',
|
||||
self::HOSTING => 'Hosting',
|
||||
self::CLOUD => 'Cloud',
|
||||
self::EMAIL => 'Email',
|
||||
self::SSL => 'SSL',
|
||||
self::DOMAIN => 'Domain',
|
||||
self::WEB_DESIGN => 'Web Design',
|
||||
};
|
||||
}
|
||||
|
||||
public function color(): string
|
||||
{
|
||||
return match ($this) {
|
||||
self::VPS => 'blue',
|
||||
self::HOSTING => 'green',
|
||||
self::CLOUD => 'cyan',
|
||||
self::EMAIL => 'yellow',
|
||||
self::SSL => 'teal',
|
||||
self::DOMAIN => 'purple',
|
||||
self::WEB_DESIGN => 'pink',
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user