pertama
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
namespace App\Enums;
|
||||
|
||||
enum TaxonomyType: string
|
||||
{
|
||||
case CATEGORY = 'category';
|
||||
case TAG = 'tag';
|
||||
|
||||
public function label(): string
|
||||
{
|
||||
return match ($this) {
|
||||
self::CATEGORY => 'Kategori',
|
||||
self::TAG => 'Tag',
|
||||
};
|
||||
}
|
||||
|
||||
public function value(): string
|
||||
{
|
||||
return match ($this) {
|
||||
self::CATEGORY => 'category',
|
||||
self::TAG => 'tag',
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user