update sosial ekonomi
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
namespace App\Enums\SosialEkonomi;
|
||||
|
||||
enum KemauanIkutProgram: int
|
||||
{
|
||||
case TIDAK_MAU = 1;
|
||||
case RAGU_RAGU = 2;
|
||||
case MAU_PERLU_DIPASTIKAN_MANFAAT = 3;
|
||||
case MAU_LIHAT_PROGRAM_DULU = 4;
|
||||
case MAU_LANGSUNG_IKUT = 5;
|
||||
|
||||
public function label(): string
|
||||
{
|
||||
return match ($this) {
|
||||
self::TIDAK_MAU => 'Tidak mau',
|
||||
self::RAGU_RAGU => 'Ragu-ragu',
|
||||
self::MAU_PERLU_DIPASTIKAN_MANFAAT => 'Mau, perlu dipastikan manfaatnya',
|
||||
self::MAU_LIHAT_PROGRAM_DULU => 'Mau, ingin lihat programnya dulu',
|
||||
self::MAU_LANGSUNG_IKUT => 'Mau, langsung ikut',
|
||||
};
|
||||
}
|
||||
|
||||
public static function options(): array
|
||||
{
|
||||
return collect(self::cases())->map(fn ($case) => [
|
||||
'value' => $case->value,
|
||||
'label' => $case->label(),
|
||||
])->toArray();
|
||||
}
|
||||
|
||||
public static function values(): array
|
||||
{
|
||||
return array_column(self::cases(), 'value');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user