FleetCart/Modules/Cart/Http/Controllers/CartShippingMethodController.php
2023-06-11 13:14:03 +01:00

24 lines
502 B
PHP

<?php
namespace Modules\Cart\Http\Controllers;
use Modules\Cart\Facades\Cart;
use Modules\Shipping\Facades\ShippingMethod;
class CartShippingMethodController
{
/**
* Store a newly created resource in storage.
*
* @return \Illuminate\Http\Response
*/
public function store()
{
$shippingMethod = ShippingMethod::get(request('shipping_method'));
Cart::addShippingMethod($shippingMethod);
return Cart::instance();
}
}