27 lines
701 B
PHP
27 lines
701 B
PHP
<?php
|
|
|
|
namespace App\Enums\Bumdes;
|
|
|
|
enum KondisiKeuanganBumdes: string
|
|
{
|
|
case UNTUNG_SURPLUS = 'untung_surplus';
|
|
case IMPAS = 'impas';
|
|
case RUGI_DEFISIT = 'rugi_defisit';
|
|
case TIDAK_MENJAWAB = 'tidak_menjawab';
|
|
|
|
public function label(): string
|
|
{
|
|
return match ($this) {
|
|
self::UNTUNG_SURPLUS => 'Untung/surplus',
|
|
self::IMPAS => 'Impas',
|
|
self::RUGI_DEFISIT => 'Rugi/defisit',
|
|
self::TIDAK_MENJAWAB => 'Tidak tahu/tidak mau menjawab',
|
|
};
|
|
}
|
|
|
|
public static function options(): array
|
|
{
|
|
return collect(self::cases())->mapWithKeys(fn (self $value) => [$value->value => $value->label()])->all();
|
|
}
|
|
}
|