From 59006964d16b6c343f6ec1509929a391ae72309a Mon Sep 17 00:00:00 2001 From: snipe Date: Tue, 25 Jul 2017 22:11:50 -0700 Subject: [PATCH] Fixes #3771 - adds username to API response on Asset API --- app/Http/Transformers/AssetsTransformer.php | 1 + 1 file changed, 1 insertion(+) diff --git a/app/Http/Transformers/AssetsTransformer.php b/app/Http/Transformers/AssetsTransformer.php index fe1fb443d3..3d229cc3d7 100644 --- a/app/Http/Transformers/AssetsTransformer.php +++ b/app/Http/Transformers/AssetsTransformer.php @@ -64,6 +64,7 @@ class AssetsTransformer 'image' => ($asset->getImageUrl()) ? $asset->getImageUrl() : null, 'assigned_to' => ($asset->assigneduser) ? [ 'id' => (int) $asset->assigneduser->id, + 'username' => e($asset->assigneduser->username), 'name' => e($asset->assigneduser->getFullNameAttribute()), 'first_name'=> e($asset->assigneduser->first_name), 'last_name'=> e($asset->assigneduser->last_name),