mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-10 07:34:06 -08:00
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:
commit
7821d38e60
|
@ -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();
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue