vendor/laravel/framework/src/Illuminate/Support/Collection.php
/**
     * Pass the collection to the given callback and then return it.
     *
     * @param  callable  $callback
     * @return $this
     */
Pass the collection to the given callback and then return it.
@param  callable  $callback
@return $this
Pass the collection to the given callback and then return it . @param callable $callback @return $this
public function tap(callable $callback)
    {
        $callback(new static($this->items));
        return $this;
    }
public function tap ( callable $ callback ) { $ callback ( new static ( $ this -> items ) ) ; return $ this ; }
Pass the collection to the given callback and then return it.
Pass the collection to the given callback and then return it .