none
<?php
namespace App\Services;
use Illuminate\Support\Collection;
use Illuminate\Session\SessionManager;
class CartService {
const MINIMUM_QUANTITY = 1;
const DEFAULT_INSTANCE = 'shopping-cart';
protected $session;
protected $instance;
/**
* Constructs a new cart object.
*
* @param Illuminate\Session\SessionManager $session
*/
public function __construct(SessionManager $session)
{
$this->session = $session;
}
/**
* Adds a new item to the cart.
*
* @param string $id
* @param string $name
* @param string $price
* @param string $quantity
* @param array $options
* @return void
*/
public function add($id, $name, $price, $quantity, $options =