Added company info to asset maintenances transforrmer

This commit is contained in:
snipe 2018-10-30 00:20:16 -07:00
parent 6b3b673daa
commit 29b0780c6c

View file

@ -27,6 +27,11 @@ class AssetMaintenancesTransformer
'name'=> ($assetmaintenance->asset->name) ? e($assetmaintenance->asset->name) : null,
'asset_tag'=> e($assetmaintenance->asset->asset_tag)
] : null,
'company' => (($assetmaintenance->asset->company) && ($assetmaintenance->asset)) ? [
'id' => (int) $assetmaintenance->asset->company->id,
'name'=> ($assetmaintenance->asset->company->name) ? e($assetmaintenance->asset->company->name) : null,
] : null,
'title' => ($assetmaintenance->title) ? e($assetmaintenance->title) : null,
'location' => (($assetmaintenance->asset) && ($assetmaintenance->asset->location)) ? [