parfum/app/Enums/IsShow.php
2025-12-08 13:46:22 +07:00

31 lines
534 B
PHP

<?php
namespace App\Enums;
use App\Traits\WithCommentEnum;
use App\Traits\WithValueEnum;
enum IsShow: int
{
use WithCommentEnum, WithValueEnum;
case SHOW = 1;
case HIDDEN = 2;
public function label(): string
{
return match ($this) {
self::SHOW => 'Ditampilkan',
self::HIDDEN => 'Disembunyikan',
};
}
public function color(): string
{
return match ($this) {
self::SHOW => 'emerald',
self::HIDDEN => 'red',
};
}
}