@@ -19,7 +19,6 @@ class PlanByAssetResource extends JsonResource
'title' => $this->title,
'asset_id' => $this->asset_id,
'asset_name' => $this->asset ? $this->asset->name : null,
- 'asset' => new AssetParentResource($this->asset),
];
}
@@ -30,7 +30,8 @@ class PlanResource extends JsonResource
return $this->children->map(function ($child){
return new PlanResource($child);
})->all();
- })
+ }),
+ 'asset' => new AssetParentResource($this->asset),