Update CategoryResource to show items of categories.
This commit is contained in:
@@ -19,6 +19,7 @@ class CategoryResource extends JsonResource
|
|||||||
'uuid' => $this->uuid,
|
'uuid' => $this->uuid,
|
||||||
'name' => $this->name,
|
'name' => $this->name,
|
||||||
'url' => $this->url,
|
'url' => $this->url,
|
||||||
|
'items' => ItemResource::collection($this->whenLoaded('items'))
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user