Skip to content

Commit

Permalink
Add element type of customfield to API response
Browse files Browse the repository at this point in the history
  • Loading branch information
inietov committed Jun 9, 2022
1 parent 728338b commit 4a0eb2b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/Http/Transformers/AssetsTransformer.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,13 +102,16 @@ public function transformAsset(Asset $asset)
'field' => e($field->convertUnicodeDbSlug()),
'value' => e($value),
'field_format' => $field->format,
'element' =>$field->element,

];

} else {
$fields_array[$field->name] = [
'field' => e($field->convertUnicodeDbSlug()),
'value' => e($asset->{$field->convertUnicodeDbSlug()}),
'field_format' => $field->format,
'element' =>$field->element,
];


Expand Down

0 comments on commit 4a0eb2b

Please sign in to comment.