public function remove($item)
    {
        $this->emitOnChange();
        $this->emit('item.remove', [$item, $this]);

        $keys = array_keys($this->items(), $item, true);
        foreach ($keys as $key) {
            unset($this->items()[$key]);
        }
        return $this;
    }
public function remove($item)
    {
        $this->emitOnChange();
        $this->emit('item.remove', [$item, $this]);

        $keys = array_keys($this->items(), $item, true);
        foreach ($keys as $key) {
            unset($this->items()[$key]);
        }
        return $this;
    }
public function remove ( $ item ) { $ this -> emitOnChange ( ) ; $ this -> emit ( 'item.remove' , [ $ item , $ this ] ) ; $ keys = array_keys ( $ this -> items ( ) , $ item , true ) ; foreach ( $ keys as $ key ) { unset ( $ this -> items ( ) [ $ key ] ) ; } return $ this ; }
Removes items equals to specified value from collection.

@param $item

@return $this
Removes items equals to specified value from collection .