store/app/Enums/EmployeeStatus.php

24 lines
433 B
PHP

<?php
namespace App\Enums;
use App\Traits\ProvidesEnumOptions;
enum EmployeeStatus: string
{
use ProvidesEnumOptions;
case ACTIVE = 'active';
case INACTIVE = 'inactive';
case RESIGNED = 'resigned';
public function label(): string
{
return match ($this) {
self::ACTIVE => 'Aktif',
self::INACTIVE => 'Tidak Aktif',
self::RESIGNED => 'Resign',
};
}
}