protected function sendThroughPipeline(array $middleware, \Closure $then)
    {
        if (count($middleware) > 0) {
            return (new Pipeline($this))
                ->send($this)
                ->through($middleware)
                ->then($then);
        }

        return $then();
    }
protected function sendThroughPipeline(array $middleware, \Closure $then)
    {
        if (count($middleware) > 0) {
            return (new Pipeline($this))
                ->send($this)
                ->through($middleware)
                ->then($then);
        }

        return $then();
    }
protected function sendThroughPipeline ( array $ middleware , \ Closure $ then ) { if ( count ( $ middleware ) > 0 ) { return ( new Pipeline ( $ this ) ) -> send ( $ this ) -> through ( $ middleware ) -> then ( $ then ) ; } return $ then ( ) ; }
Send the request through the pipeline with the given callback.

@param  array  $middleware
@param  \Closure  $then
@return mixed
Send the request through the pipeline with the given callback .