Fix seller shop title product resource
This commit is contained in:
parent
07b9a46495
commit
39ecaab3f2
|
|
@ -57,7 +57,6 @@ class Products extends ProductController
|
||||||
->limit(3)
|
->limit(3)
|
||||||
->get();
|
->get();
|
||||||
|
|
||||||
|
|
||||||
$banner = $sliderRepository->select('title', 'path', 'content', 'expired_at', 'sort_order', 'slider_path')
|
$banner = $sliderRepository->select('title', 'path', 'content', 'expired_at', 'sort_order', 'slider_path')
|
||||||
->where(function ($query) {
|
->where(function ($query) {
|
||||||
$query->where('expired_at', '>=', Carbon::now()->format('Y-m-d'))
|
$query->where('expired_at', '>=', Carbon::now()->format('Y-m-d'))
|
||||||
|
|
@ -67,7 +66,6 @@ class Products extends ProductController
|
||||||
->limit(1)
|
->limit(1)
|
||||||
->get();
|
->get();
|
||||||
|
|
||||||
|
|
||||||
$newProducts = ProductResource::collection($this->productRepository->getNewProducts());
|
$newProducts = ProductResource::collection($this->productRepository->getNewProducts());
|
||||||
$featuredProducts = ProductResource::collection($this->productRepository->getFeaturedProducts());
|
$featuredProducts = ProductResource::collection($this->productRepository->getFeaturedProducts());
|
||||||
// $slider_map = $sliders->map(function ($item, $key){
|
// $slider_map = $sliders->map(function ($item, $key){
|
||||||
|
|
|
||||||
|
|
@ -51,14 +51,13 @@ 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,
|
'qty' => $this->qty,
|
||||||
'status' => $this->status,
|
'status' => $this->status,
|
||||||
'product_number' => $this->product_number,
|
'product_number' => $this->product_number,
|
||||||
'seller' => $this->seller,
|
|
||||||
// 'brand' => $product->brand->name ?? '',
|
// 'brand' => $product->brand->name ?? '',
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue