|
@@ -409,7 +409,7 @@ class FlexibleVariantController extends Controller
|
|
|
|
|
|
|
|
$variantIds=collect($variants)->pluck('id');
|
|
$variantIds=collect($variants)->pluck('id');
|
|
|
//删除无用的变体
|
|
//删除无用的变体
|
|
|
- $this->_product->variants()->whereNotIn('id', $variantIds)->delete();
|
|
|
|
|
|
|
+ $this->_product->flexibleVariants()->whereNotIn('id', $variantIds)->delete();
|
|
|
DB::commit();
|
|
DB::commit();
|
|
|
return response()->json([
|
|
return response()->json([
|
|
|
'success' => true,
|
|
'success' => true,
|