public function load($identifier, $name = null)
    {
        $name = $name ?: self::DEFAULT_NAME;

        $classname = config('shoppingcart.models.shoppingcart');
        $shoppingcart = $classname::firstOrNew($this->defaultValues($identifier, $name));

        return $shoppingcart;
    }
public function load($identifier, $name = null)
    {
        $name = $name ?: self::DEFAULT_NAME;

        $classname = config('shoppingcart.models.shoppingcart');
        $shoppingcart = $classname::firstOrNew($this->defaultValues($identifier, $name));

        return $shoppingcart;
    }
public function load ( $ identifier , $ name = null ) { $ name = $ name ? : self :: DEFAULT_NAME ; $ classname = config ( 'shoppingcart.models.shoppingcart' ) ; $ shoppingcart = $ classname :: firstOrNew ( $ this -> defaultValues ( $ identifier , $ name ) ) ; return $ shoppingcart ; }
Load a cart from the database. If no cart exists, an empty cart is returned

@param array|string $identifier
@param null         $name

@return mixed
Load a cart from the database . If no cart exists an empty cart is returned