From ee9133f72254ef01b3d00e236de602c587ab9dcc Mon Sep 17 00:00:00 2001 From: Ivan Nieto Vivanco Date: Wed, 27 Oct 2021 16:42:51 -0500 Subject: [PATCH] Return the proper Asset-Components relationship --- app/Models/Asset.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Models/Asset.php b/app/Models/Asset.php index 7a7818094d..928a81ee80 100644 --- a/app/Models/Asset.php +++ b/app/Models/Asset.php @@ -386,7 +386,7 @@ 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')->withTrashed(); }