Merge pull request #10238 from inietov/fixes/asset_components_must_return_relationship_instance

Fixes asset components must return relationship instance
This commit is contained in:
snipe 2021-10-28 16:38:21 -07:00 committed by GitHub
commit 7821d38e60
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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();
}