petani lahan dan skor

This commit is contained in:
2026-07-10 08:47:48 +07:00
parent 26f6e83328
commit d49bd4953c
16 changed files with 564 additions and 166 deletions
+17
View File
@@ -7,4 +7,21 @@ enum KeparahanSerangan: string
case RINGAN = 'ringan';
case SEDANG = 'sedang';
case BERAT = 'berat';
public function label(): string
{
return match($this) {
self::RINGAN => 'Ringan',
self::SEDANG => 'Sedang',
self::BERAT => 'Berat',
};
}
public static function options(): array
{
return collect(self::cases())->map(fn ($case) => [
'value' => $case->value,
'label' => $case->label(),
])->toArray();
}
}