mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-05-07 20:32:26 +00:00
29 lines
550 B
PHP
29 lines
550 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Enums;
|
|
|
|
use Datomatic\LaravelEnumHelper\LaravelEnumHelper;
|
|
|
|
enum TimeFormat: string
|
|
{
|
|
use LaravelEnumHelper;
|
|
|
|
case TwelveHours = '12-hours';
|
|
case TwentyFourHours = '24-hours';
|
|
|
|
/**
|
|
* @return array<string, string>
|
|
*/
|
|
public static function toSelectArray(): array
|
|
{
|
|
$selectArray = [];
|
|
foreach (self::values() as $value) {
|
|
$selectArray[(string) $value] = (string) __('enum.time_format.'.$value);
|
|
}
|
|
|
|
return $selectArray;
|
|
}
|
|
}
|