6
0
Fork 0
panliang 2023-03-18 16:55:19 +08:00
parent 856515cff9
commit 44dcde1906
1 changed files with 1 additions and 0 deletions

View File

@ -69,6 +69,7 @@ class StoreController extends Controller
$sku = $store->productSkus()
->where('product_spu_id', $spu->id)
->where('amount', '>', 0)
->when($request->filled('sku_id'), fn($q) => $q->where('product_sku_id', $request->input('sku_id')))
->first();
if (!$sku) {