Update Migration Input Update Praktik Budidaya
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
namespace App\Enums\PraktikBudidaya;
|
||||
|
||||
enum TindakanPanenReject: string
|
||||
{
|
||||
case BUANG = 'Dibuang';
|
||||
case JUAL = 'Dijual ke tempat lain';
|
||||
|
||||
public function label(): string
|
||||
{
|
||||
return match($this) {
|
||||
self::BUANG => 'Dibuang',
|
||||
self::JUAL => 'Dijual ke tempat lain',
|
||||
};
|
||||
}
|
||||
|
||||
public static function options(): array
|
||||
{
|
||||
return collect(self::cases())->map(fn ($case) => [
|
||||
'value' => $case->value,
|
||||
'label' => $case->label(),
|
||||
])->toArray();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user