Update BUMDes
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
namespace App\Enums\Bumdes;
|
||||
|
||||
enum PengalamanOfftakerBumdes: string
|
||||
{
|
||||
case BERJALAN = 'berjalan';
|
||||
case BERHENTI = 'berhenti';
|
||||
case BELUM_PERNAH = 'belum_pernah';
|
||||
|
||||
public function label(): string
|
||||
{
|
||||
return match ($this) {
|
||||
self::BERJALAN => 'Sedang berjalan',
|
||||
self::BERHENTI => 'Pernah, tapi sudah berhenti',
|
||||
self::BELUM_PERNAH => 'Belum pernah',
|
||||
};
|
||||
}
|
||||
|
||||
public static function options(): array
|
||||
{
|
||||
return collect(self::cases())->mapWithKeys(fn (self $value) => [$value->value => $value->label()])->all();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user