public function removeItem($itemHash)
    {
        if (empty($this->cart->items) === false) {
            foreach ($this->cart->items as $itemKey => $item) {
                if ($item->getHash() == $itemHash) {
                    unset($this->cart->items[$itemKey]);
                    break;
                }
            }

            $this->events->dispatch('laracart.removeItem', $item);

            $this->update();
        }
    }
public function removeItem($itemHash)
    {
        if (empty($this->cart->items) === false) {
            foreach ($this->cart->items as $itemKey => $item) {
                if ($item->getHash() == $itemHash) {
                    unset($this->cart->items[$itemKey]);
                    break;
                }
            }

            $this->events->dispatch('laracart.removeItem', $item);

            $this->update();
        }
    }
public function removeItem ( $ itemHash ) { if ( empty ( $ this -> cart -> items ) === false ) { foreach ( $ this -> cart -> items as $ itemKey => $ item ) { if ( $ item -> getHash ( ) == $ itemHash ) { unset ( $ this -> cart -> items [ $ itemKey ] ) ; break ; } } $ this -> events -> dispatch ( 'laracart.removeItem' , $ item ) ; $ this -> update ( ) ; } }
Removes a CartItem based on the itemHash.

@param $itemHash
Removes a CartItem based on the itemHash .