protected function addMiddleware($middleware)
    {
        $kernel = $this->app['Illuminate\Contracts\Http\Kernel'];

        if (is_array($middleware)) {
            foreach ($middleware as $ware) {
                $kernel->pushMiddleware($ware);
            }
        } else {
            $kernel->pushMiddleware($middleware);
        }
    }
protected function addMiddleware($middleware)
    {
        $kernel = $this->app['Illuminate\Contracts\Http\Kernel'];

        if (is_array($middleware)) {
            foreach ($middleware as $ware) {
                $kernel->pushMiddleware($ware);
            }
        } else {
            $kernel->pushMiddleware($middleware);
        }
    }
protected function addMiddleware ( $ middleware ) { $ kernel = $ this -> app [ 'Illuminate\Contracts\Http\Kernel' ] ; if ( is_array ( $ middleware ) ) { foreach ( $ middleware as $ ware ) { $ kernel -> pushMiddleware ( $ ware ) ; } } else { $ kernel -> pushMiddleware ( $ middleware ) ; } }
Register any additional module middleware.

@param array|string $middleware

@return void
Register any additional module middleware .