mirror of
https://github.com/snipe/snipe-it.git
synced 2025-02-21 03:15:45 -08:00
Added pivot to components JSON
Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
parent
d0acb9fdb4
commit
daa88f06f7
|
@ -144,6 +144,7 @@ class AssetsTransformer
|
|||
$array['components'][] = [
|
||||
[
|
||||
'id' => $component->id,
|
||||
'pivot_id' => $component->pivot->id,
|
||||
'name' => $component->name,
|
||||
'qty' => $component->pivot->assigned_qty,
|
||||
'price_cost' => $component->purchase_cost,
|
||||
|
@ -219,4 +220,4 @@ class AssetsTransformer
|
|||
return $array;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue