value}"); } public function getColor(): string { return match ($this) { self::Draft => 'gray', self::Review => 'warning', self::Published => 'success', self::Archived => 'danger', }; } public function getIcon(): string { return match ($this) { self::Draft => 'heroicon-o-pencil-square', self::Review => 'heroicon-o-eye', self::Published => 'heroicon-o-check-circle', self::Archived => 'heroicon-o-archive-box', }; } /** * @return array */ public static function options(): array { return collect(self::cases()) ->mapWithKeys(fn (self $case) => [$case->value => $case->getLabel()]) ->all(); } }