Add status to product resource
This commit is contained in:
parent
c929bfe9d5
commit
6f954cdb94
|
|
@ -37,7 +37,7 @@ class Product extends JsonResource
|
||||||
return [
|
return [
|
||||||
/* product's information */
|
/* product's information */
|
||||||
'id' => $product->id,
|
'id' => $product->id,
|
||||||
// 'sku' => $product->sku,
|
'sku' => $product->sku,
|
||||||
'type' => $product->type,
|
'type' => $product->type,
|
||||||
'name' => $product->name,
|
'name' => $product->name,
|
||||||
'categories' => $product->categories,
|
'categories' => $product->categories,
|
||||||
|
|
@ -51,10 +51,12 @@ class Product extends JsonResource
|
||||||
'in_stock' => $product->haveSufficientQuantity(1),
|
'in_stock' => $product->haveSufficientQuantity(1),
|
||||||
'is_wishlisted' => $this->isWishlisted($product) ,
|
'is_wishlisted' => $this->isWishlisted($product) ,
|
||||||
'is_item_in_cart' => \Cart::hasProduct($product),
|
'is_item_in_cart' => \Cart::hasProduct($product),
|
||||||
'shop_title' => $this->shop_title,
|
//'shop_title' => $this->shop_title,
|
||||||
'logo' => $this->logo ? Storage::url($this->logo) : null,
|
//'logo' => $this->logo ? Storage::url($this->logo) : null,
|
||||||
'new' => $this->new,
|
'new' => $this->new,
|
||||||
'featured' => $this->featured,
|
'featured' => $this->featured,
|
||||||
|
'qty' => $this->qty,
|
||||||
|
'status' => $this->status,
|
||||||
// 'brand' => $product->brand->name ?? '',
|
// 'brand' => $product->brand->name ?? '',
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue