FleetCart/Modules/Cart/Http/Controllers/CartShippingMethodController.php

24 lines
502 B
PHP
Raw Normal View History

2023-06-11 12:14:03 +00:00
<?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();
}
}