Files
hr/app/Enums/Gender.php
2026-07-30 17:24:40 +05:00

40 lines
781 B
PHP

<?php
declare(strict_types=1);
namespace App\Enums;
enum Gender: string
{
case Male = 'male';
case Female = 'female';
case Other = 'other';
public function label(): string
{
return match ($this) {
self::Male => 'Male',
self::Female => 'Female',
self::Other => 'Other',
};
}
public function color(): string
{
return match ($this) {
self::Male => 'info',
self::Female => 'pink',
self::Other => 'gray',
};
}
public function icon(): string
{
return match ($this) {
self::Male => 'heroicon-o-user',
self::Female => 'heroicon-o-user',
self::Other => 'heroicon-o-users',
};
}
}