update([ 'use_shipping_insurance' => true, ]); Cart::collectTotals(); } /** * 移除运费险 */ public function remove(): void { $cart = Cart::getCart(); if (! $cart) { throw new \Exception('Cart not found.'); } $cart->update([ 'use_shipping_insurance' => false, ]); Cart::collectTotals(); } }