data ekosistem petani

Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
2026-04-28 15:02:53 +07:00
co-authored by Copilot
parent f9c8009600
commit 3fd63e844c
12 changed files with 1406 additions and 0 deletions
+31
View File
@@ -0,0 +1,31 @@
<?php
namespace App\Enums;
enum Pernikahan: string
{
case BELUM_KAWIN = '01_belum_kawin';
case KAWIN_TERCATAT = '02_kawin_tercatat';
case KAWIN_BELUM_TERCATAT = '03_kawin_belum_tercatat';
case CERAI_HIDUP = '04_cerai_hidup';
case CERAI_MATI = '05_cerai_mati';
public function label(): string
{
return match($this) {
self::BELUM_KAWIN => 'Belum Menikah',
self::KAWIN_TERCATAT => 'Menikah (Tercatat)',
self::KAWIN_BELUM_TERCATAT => 'Menikah (Belum Tercatat)',
self::CERAI_HIDUP => 'Cerai Hidup',
self::CERAI_MATI => 'Cerai Mati',
};
}
public static function options(): array
{
return collect(self::cases())->map(fn ($case) => [
'value' => $case->value,
'label' => $case->label(),
])->toArray();
}
}