src/Support/Collection.php
/**
     * Create a collection of all elements that do not pass a given truth test.
     *
     * @param callable|mixed  $callback
     * @return static
     */
Create a collection of all elements that do not pass a given truth test.
@param callable|mixed  $callback
@return static
Create a collection of all elements that do not pass a given truth test . @param callable|mixed $callback @return static
public function reject($callback)
    {
        if ($this->useAsCallable($callback)) {
            return $this->filter(function ($value, $key) use ($callback) {
                return ! $callback($value, $key);
            });
        }
        return $this->filter(function ($item) use ($callback) {
            return $item != $callback;
        });
    }
public function reject ( $ callback ) { if ( $ this -> useAsCallable ( $ callback ) ) { return $ this -> filter ( function ( $ value , $ key ) use ( $ callback ) { return ! $ callback ( $ value , $ key ) ; } ) ; } return $ this -> filter ( function ( $ item ) use ( $ callback ) { return $ item != $ callback ; } ) ; }
Create a collection of all elements that do not pass a given truth test.
Create a collection of all elements that do not pass a given truth test .