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