mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-31 16:37:27 -08:00
Added created_by to models API
Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
parent
0c3b8cb114
commit
d4018a2834
|
@ -65,6 +65,10 @@ class AssetModelsTransformer
|
|||
'eol' => ($assetmodel->eol > 0) ? $assetmodel->eol.' months' : 'None',
|
||||
'requestable' => ($assetmodel->requestable == '1') ? true : false,
|
||||
'notes' => Helper::parseEscapedMarkedownInline($assetmodel->notes),
|
||||
'created_by' => ($assetmodel->adminuser) ? [
|
||||
'id' => (int) $assetmodel->adminuser->id,
|
||||
'name'=> e($assetmodel->adminuser->present()->fullName()),
|
||||
] : null,
|
||||
'created_at' => Helper::getFormattedDateObject($assetmodel->created_at, 'datetime'),
|
||||
'updated_at' => Helper::getFormattedDateObject($assetmodel->updated_at, 'datetime'),
|
||||
'deleted_at' => Helper::getFormattedDateObject($assetmodel->deleted_at, 'datetime'),
|
||||
|
|
Loading…
Reference in a new issue