base
parent
159b78cb2c
commit
3f25b8aecb
|
|
@ -41,12 +41,10 @@ class StoreController extends Controller
|
||||||
$input['sort'] = '-id';
|
$input['sort'] = '-id';
|
||||||
}
|
}
|
||||||
|
|
||||||
$fields = ['product_spus.id', 'product_spus.name', 'product_spus.cover', 'product_spus.sell_price', 'product_spus.vip_price', 'product_spus.market_price', 'store_product_skus.amount'];
|
|
||||||
|
|
||||||
$list = $store->productSpus()
|
$list = $store->productSpus()
|
||||||
->with(['specs'])
|
->with(['specs'])
|
||||||
|
->distinct('store_product_skus.spu_id')
|
||||||
->filter($input)
|
->filter($input)
|
||||||
// ->online()
|
|
||||||
->wherePivot('status', 1)
|
->wherePivot('status', 1)
|
||||||
->simplePaginate(Paginator::resolvePerPage('per_page', 20, 50));
|
->simplePaginate(Paginator::resolvePerPage('per_page', 20, 50));
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue