Return the proper Asset-Components relationship
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user