Files
hr/app/Enums/Gender.php
2026-07-31 18:08:08 +05:00

40 lines
832 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 => __('enums.gender.male'),
self::Female => __('enums.gender.female'),
self::Other => __('enums.gender.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',
};
}
}