public function setAttribute($attribute, $value) { array_set($this->cart->attributes, $attribute, $value); $this->update(); }