Skip to content

A free open source IT asset/license management system

Include created_by in pivot

snipe16ea577099ec
diff --git a/app/Models/Asset.php b/app/Models/Asset.php
index fbb47a2a30..1176a88a8b 100644
--- a/app/Models/Asset.php
+++ b/app/Models/Asset.php
@@ -674,7 +674,8 @@ class Asset extends Depreciable
*/
public function components()
{
- return $this->belongsToMany('\App\Models\Component', 'components_assets', 'asset_id', 'component_id')->withPivot('id', 'assigned_qty', 'created_at', 'note');
+ return $this->belongsToMany('\App\Models\Component', 'components_assets', 'asset_id', 'component_id')
+ ->withPivot('id', 'assigned_qty', 'created_at', 'note', 'created_by');
}
/**