public function update($rawId, $attribute)
{
if (!($row = $this->get($rawId))) {
throw new Exception('Item not found.');
}
$cart = $this->getCart();
$this->event->fire('cart.updating', [$row, $cart]);
if (is_array($attribute)) {
$raw = $this->updateAttribute($rawId, $attribute);
} else {
$raw = $this->updateQty($rawId, $attribute);
}
$this->event->fire('cart.updated', [$row, $cart]);
return $raw;
}