vendor api
This commit is contained in:
parent
fb00c75d0d
commit
5c38b5a5dc
|
|
@ -277,8 +277,7 @@ class SellerProduct extends SellerProductController
|
|||
//$images = json_decode($request['images']['files'][0]);
|
||||
//\Log::info($images);
|
||||
//\Log::info($request->all());
|
||||
\Log::info($request['images']);
|
||||
\Log::info($request['surats']);
|
||||
|
||||
// dd($request->get('images'));
|
||||
// dd($request['images']);
|
||||
$data = array(
|
||||
|
|
|
|||
|
|
@ -65,11 +65,12 @@ class Vendors extends V1Controller
|
|||
|
||||
public function index()
|
||||
{
|
||||
$vendors = $this->vendorRepository->select('marketplace_sellers.id','url','logo','banner','shop_title','brand_attribute_id','ship_time','ship_price','slogan')
|
||||
$vendors = $this->vendorRepository->select('marketplace_sellers.id','url','logo','banner','shop_title', 'ship_time','ship_price','slogan')
|
||||
->where('is_approved',true)
|
||||
->with(['categories:seller_id,categories'])
|
||||
// ->leftJoin('seller_categories','marketplace_sellers.id','=','seller_categories.seller_id')
|
||||
->get();
|
||||
->paginate(15);
|
||||
|
||||
$reviewed_vendors = $vendors->map(function ($item, $key){
|
||||
$item->review_average = $this->reviewRepository->getAverageRating($item);
|
||||
return $item;
|
||||
|
|
|
|||
|
|
@ -50,12 +50,13 @@ 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,
|
||||
'product_number' => $this->product_number,
|
||||
// 'brand' => $product->brand->name ?? '',
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue