lk-students/app/Helpers/AllfieldsUserHelper.php

17 lines
300 B
PHP

<?php
namespace App\Helpers;
use App\Enums\UserFields;
class AllfieldsUserHelper
{
public static function get()
{
return array_reduce(UserFields::cases(), function ($carry, $item) {
$carry[$item->name] = $item->value;
return $carry;
}, []);
}
}