27 lines
860 B
PHP
27 lines
860 B
PHP
<?php
|
|
|
|
namespace App\Enums\Bumdes;
|
|
|
|
enum PeranRantaiNilaiBumdes: string
|
|
{
|
|
case MEMBELI_LANGSUNG = 'membeli_langsung';
|
|
case PERANTARA = 'perantara';
|
|
case MENGOLAH_SENDIRI = 'mengolah_sendiri';
|
|
case BELUM_BERPERAN = 'belum_berperan';
|
|
|
|
public function label(): string
|
|
{
|
|
return match ($this) {
|
|
self::MEMBELI_LANGSUNG => 'Membeli langsung dari petani',
|
|
self::PERANTARA => 'Menjadi perantara/mengumpulkan untuk dijual ke pihak lain',
|
|
self::MENGOLAH_SENDIRI => 'Mengolah sendiri (sortasi/fermentasi/dll) sebelum dijual',
|
|
self::BELUM_BERPERAN => 'Belum berperan dalam rantai nilai komoditas ini',
|
|
};
|
|
}
|
|
|
|
public static function options(): array
|
|
{
|
|
return collect(self::cases())->mapWithKeys(fn (self $value) => [$value->value => $value->label()])->all();
|
|
}
|
|
}
|