ldc-legaulois/app/Enums/Departaimant.php
2023-06-26 16:02:23 +02:00

32 lines
582 B
PHP

<?php
namespace App\Enums;
use Kwaadpepper\Enum\BaseEnumRoutable;
abstract class Departaimant extends BaseEnumRoutable
{
/**
* Output the value as a string
*
* @return string
*/
public function __toString(): string
{
return (string)$this->label;
}
/**
* Get All departaimants
*
* @return array<Departaimant>
*/
public static function all(): array
{
$o = [];
foreach (static::toArray() as $value => $label) {
$o[] = static::make($value);
}
return $o;
}
}