This commit is contained in:
philipp lang 2024-02-20 01:04:53 +01:00
parent 8713f941c1
commit c9cbf86626
1 changed files with 4 additions and 5 deletions

View File

@ -36,15 +36,14 @@ class ParticipantResource extends JsonResource
{
return [
'active_columns' => $form->active_columns,
'columns' => $form->getFields()->map(function ($field) {
$field = Field::fromConfig($field);
return [
'columns' => $form->getFields()
->map(fn ($field) => Field::fromConfig($field))
->map(fn ($field) => [
'name' => $field->name,
'base_type' => class_basename($field),
'id' => $field->key,
'display_attribute' => $field->getdisplayAttribute(),
];
})
])
];
}
}