diff --git a/composer.json b/composer.json index 41f7b92a..226e70de 100644 --- a/composer.json +++ b/composer.json @@ -1,5 +1,5 @@ { - "name": "gloudemans/shoppingcart", + "name": "elhajouji5/shoppingcart", "description": "Laravel Shoppingcart", "keywords": ["laravel", "shoppingcart"], "license": "MIT", @@ -10,9 +10,9 @@ } ], "require": { - "illuminate/support": "5.1.* || 5.2.* || 5.3.* || 5.4.* || 5.5.*|| 5.6.* || 5.7.*", - "illuminate/session": "5.1.* || 5.2.* || 5.3.* || 5.4.* || 5.5.*|| 5.6.* || 5.7.*", - "illuminate/events": "5.1.* || 5.2.* || 5.3.* || 5.4.* || 5.5.*|| 5.6.* || 5.7.*" + "illuminate/support": "5.4.* || 5.5.*|| 5.6.* || 5.7.* || 5.8.*", + "illuminate/session": "5.4.* || 5.5.*|| 5.6.* || 5.7.* || 5.8.*", + "illuminate/events": "5.4.* || 5.5.*|| 5.6.* || 5.7.* || 5.8.*" }, "require-dev": { "phpunit/phpunit": "~5.0 || ~6.0 || ~7.0", diff --git a/src/Cart.php b/src/Cart.php index 09853dba..a2662cb9 100644 --- a/src/Cart.php +++ b/src/Cart.php @@ -104,7 +104,7 @@ public function add($id, $name = null, $qty = null, $price = null, array $option $content->put($cartItem->rowId, $cartItem); - $this->events->fire('cart.added', $cartItem); + $this->events->dispatch('cart.added', $cartItem); $this->session->put($this->instance, $content); @@ -148,7 +148,7 @@ public function update($rowId, $qty) $content->put($cartItem->rowId, $cartItem); } - $this->events->fire('cart.updated', $cartItem); + $this->events->dispatch('cart.updated', $cartItem); $this->session->put($this->instance, $content); @@ -169,7 +169,7 @@ public function remove($rowId) $content->pull($cartItem->rowId); - $this->events->fire('cart.removed', $cartItem); + $this->events->dispatch('cart.removed', $cartItem); $this->session->put($this->instance, $content); } @@ -360,7 +360,7 @@ public function store($identifier) 'content' => serialize($content) ]); - $this->events->fire('cart.stored'); + $this->events->dispatch('cart.stored'); } /** @@ -390,7 +390,7 @@ public function restore($identifier) $content->put($cartItem->rowId, $cartItem); } - $this->events->fire('cart.restored'); + $this->events->dispatch('cart.restored'); $this->session->put($this->instance, $content);