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 HubunganDalamKeluarga: string
{
case KEPALA_KELUARGA = '01_kepala_keluarga';
case ISTRI_SUAMI = '02_istri_suami';
case ANAK = '03_anak';
case KELUARGA_INTI = '04_keluarga_inti';
case FAMILI_LAIN = '05_famili_lain';
public function label(): string
{
return match($this) {
self::KEPALA_KELUARGA => 'Kepala Keluarga',
self::ISTRI_SUAMI => 'Istri/Suami',
self::ANAK => 'Anak',
self::KELUARGA_INTI => 'Keluarga Inti (Menantu, Cucu, Orang Tua, Mertua, Saudara Kandung)',
self::FAMILI_LAIN => 'Famili Lain/Pembantu',
};
}
public static function options(): array
{
return collect(self::cases())->map(fn ($case) => [
'value' => $case->value,
'label' => $case->label(),
])->toArray();
}
}