KTVRemote/app/Enums/Traits/HasLabels.php
allen.yan 55666c1475 202508271300
加入首頁,熱門,最新 頁面
2025-08-27 13:03:26 +08:00

20 lines
389 B
PHP

<?php
namespace App\Enums\Traits;
use Illuminate\Support\Collection;
trait HasLabels
{
public static function options(): Collection
{
return collect(self::cases())->mapWithKeys(function (self $case) {
return [$case->value => $case->labels()];
});
}
public function labelPowergridFilter(): string
{
return $this->labels();
}
}