release
parent
1b44673f05
commit
d657a68aec
|
|
@ -26,10 +26,7 @@ class PartController extends Controller
|
||||||
$part = ProductPart::where('key', $key)->first();
|
$part = ProductPart::where('key', $key)->first();
|
||||||
}
|
}
|
||||||
|
|
||||||
$paginator = ProductPartSku::with('sku:id,name,cover,sell_price,vip_price,market_price')
|
$paginator = ProductPartSku::with('spu:id,name,cover,sell_price,vip_price,market_price')
|
||||||
->whereHas('sku', function ($query) {
|
|
||||||
return $query->online();
|
|
||||||
})
|
|
||||||
->when($part, function ($query, $part) {
|
->when($part, function ($query, $part) {
|
||||||
$query->where('part_id', $part->id);
|
$query->where('part_id', $part->id);
|
||||||
}, function ($query) {
|
}, function ($query) {
|
||||||
|
|
@ -40,7 +37,7 @@ class PartController extends Controller
|
||||||
|
|
||||||
return ProductSkuTinyResource::collection(
|
return ProductSkuTinyResource::collection(
|
||||||
$paginator->through(function ($item) {
|
$paginator->through(function ($item) {
|
||||||
return $item->sku;
|
return $item->spu;
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue