src/Traits/Collection/MainTrait.php
public function remove($element)
    {
        if ($this->count() > 0) {
            foreach ($this->elements as $index => $existing) {
                if ($element === $existing) {
                    unset($this->elements[$index]);

                    break;
                }
            }
        }

        return $this;
    }
public function remove($element)
    {
        if ($this->count() > 0) {
            foreach ($this->elements as $index => $existing) {
                if ($element === $existing) {
                    unset($this->elements[$index]);

                    break;
                }
            }
        }

        return $this;
    }
public function remove ( $ element ) { if ( $ this -> count ( ) > 0 ) { foreach ( $ this -> elements as $ index => $ existing ) { if ( $ element === $ existing ) { unset ( $ this -> elements [ $ index ] ) ; break ; } } } return $ this ; }
Removes given element

@param mixed $element The element to remove
@return $this
Removes given element