order detail

This commit is contained in:
Kerim 2023-09-03 16:27:46 +05:00
parent 2ba6415771
commit fb00c75d0d
1 changed files with 8 additions and 3 deletions

View File

@ -67,7 +67,7 @@ class Vendors extends V1Controller
{
$vendors = $this->vendorRepository->select('marketplace_sellers.id','url','logo','banner','shop_title','brand_attribute_id','ship_time','ship_price','slogan')
->where('is_approved',true)
->with(['categories:seller_id,type,categories'])
->with(['categories:seller_id,categories'])
// ->leftJoin('seller_categories','marketplace_sellers.id','=','seller_categories.seller_id')
->get();
$reviewed_vendors = $vendors->map(function ($item, $key){
@ -91,9 +91,9 @@ class Vendors extends V1Controller
}
public function vendor($seller_id){
$vendor = $this->vendorRepository->select('marketplace_sellers.id','url','logo','banner','shop_title','brand_attribute_id','ship_time','ship_price','slogan')
$vendor = $this->vendorRepository->select('marketplace_sellers.id','url','logo','banner','shop_title', 'ship_time','ship_price','slogan')
->where('id',$seller_id)
->with(['categories:seller_id,type,categories'])
->with(['categories:seller_id,categories'])
->first();
if($vendor->categories && $mainCats = $vendor->categories()->first()){
@ -108,6 +108,11 @@ class Vendors extends V1Controller
->orderBy('position','asc')
->get();
}else{
return response([
'status' => 500,
'message' => 'cant find seller category'
]);
}
// dd($vendor->categories()->first());