feat: expose category name in ProductResource
This commit is contained in:
@@ -21,6 +21,7 @@ class ProductResource extends JsonResource
|
||||
'product_type' => $this->product_type,
|
||||
'page_type' => $this->resolvePageType($this->product_type),
|
||||
'product_categories_id' => $this->whenLoaded('category', fn() => $this->category?->id),
|
||||
'category' => $this->whenLoaded('category', fn() => $this->category?->name),
|
||||
'cpu' => $this->cpu,
|
||||
'ram' => $this->ram,
|
||||
'disk' => $this->disk,
|
||||
|
||||
Reference in New Issue
Block a user