protected function callTerminableMiddleware($response)
    {
        if ($this->shouldSkipMiddleware()) {
            return;
        }

        $response = $this->prepareResponse($response);

        foreach ($this->middleware as $middleware) {
            if (! is_string($middleware)) {
                continue;
            }

            $instance = $this->make(explode(':', $middleware)[0]);

            if (method_exists($instance, 'terminate')) {
                $instance->terminate($this->make('request'), $response);
            }
        }
    }
protected function callTerminableMiddleware($response)
    {
        if ($this->shouldSkipMiddleware()) {
            return;
        }

        $response = $this->prepareResponse($response);

        foreach ($this->middleware as $middleware) {
            if (! is_string($middleware)) {
                continue;
            }

            $instance = $this->make(explode(':', $middleware)[0]);

            if (method_exists($instance, 'terminate')) {
                $instance->terminate($this->make('request'), $response);
            }
        }
    }
protected function callTerminableMiddleware ( $ response ) { if ( $ this -> shouldSkipMiddleware ( ) ) { return ; } $ response = $ this -> prepareResponse ( $ response ) ; foreach ( $ this -> middleware as $ middleware ) { if ( ! is_string ( $ middleware ) ) { continue ; } $ instance = $ this -> make ( explode ( ':' , $ middleware ) [ 0 ] ) ; if ( method_exists ( $ instance , 'terminate' ) ) { $ instance -> terminate ( $ this -> make ( 'request' ) , $ response ) ; } } }
Call the terminable middleware.

@param  mixed  $response
@return void
Call the terminable middleware .