perbaikan petani dan lahan

This commit is contained in:
2026-07-12 23:37:36 +07:00
parent d33bc8a42b
commit 2bf2a68a3a
10 changed files with 332 additions and 142 deletions
+17
View File
@@ -7,4 +7,21 @@ enum SeranganHama: string
case ULAT = 'ulat';
case BELALANG = 'belalang';
case KUTU = 'kutu';
public function label(): string
{
return match ($this) {
self::ULAT => 'Ulat',
self::BELALANG => 'Belalang',
self::KUTU => 'Kutu',
};
}
public static function options(): array
{
return collect(self::cases())->map(fn ($case) => [
'value' => $case->value,
'label' => $case->label(),
])->toArray();
}
}