sigd/app/Enums/LingkupAksesData.php

27 lines
512 B
PHP

<?php
namespace App\Enums;
enum LingkupAksesData: string
{
case ALL = 'all';
case INTERNAL = 'internal';
public function label(): string
{
return match ($this) {
self::ALL => 'Semua Data',
self::INTERNAL => 'Internal Instansi',
};
}
public static function getOptions(): array
{
$options = [];
foreach (self::cases() as $case) {
$options[$case->value] = $case->label();
}
return $options;
}
}