public function removeEmpty($considerEmpty = [''])
    {
        foreach ($this->all() as $key => $value) {
            if (!is_scalar($value) && !is_null($value)) {
                continue;
            }
            foreach ($considerEmpty as $empty) {
                if ($value === $empty) {
                    $this->remove($key);
                    break;
                }
            }
        }

        return $this;
    }
public function removeEmpty($considerEmpty = [''])
    {
        foreach ($this->all() as $key => $value) {
            if (!is_scalar($value) && !is_null($value)) {
                continue;
            }
            foreach ($considerEmpty as $empty) {
                if ($value === $empty) {
                    $this->remove($key);
                    break;
                }
            }
        }

        return $this;
    }
public function removeEmpty ( $ considerEmpty = [ '' ] ) { foreach ( $ this -> all ( ) as $ key => $ value ) { if ( ! is_scalar ( $ value ) && ! is_null ( $ value ) ) { continue ; } foreach ( $ considerEmpty as $ empty ) { if ( $ value === $ empty ) { $ this -> remove ( $ key ) ; break ; } } } return $ this ; }
Removes empty collection items.

@param array $considerEmpty [optional]

@return $this
Removes empty collection items .