17 lines
300 B
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;
|
||
|
}, []);
|
||
|
}
|
||
|
}
|