diff --git a/app/Http/Resources/Api/Admin/ProductResource.php b/app/Http/Resources/Api/Admin/ProductResource.php index ae61dad..a295171 100644 --- a/app/Http/Resources/Api/Admin/ProductResource.php +++ b/app/Http/Resources/Api/Admin/ProductResource.php @@ -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,