禁用Laravel 5.0测试的中间件

Is there any way to disable Middleware to test a page in Laravel 5.0?

I know 5.1 has "withoutMiddleware()" method, but how about in Laravel 5.0?

I have a custom authentication middleware that doesn't hook into the core user system. However, I need to disable it to test things behind wall.

Unfortunately, our server environment doesn't allow me to upgrade to 5.1, so that isn't an option.

Thanks! Troy

The easiest option, if it's just for temporary testing purposes, is to just temporarily disable the middleware in Kernel.php. However, another option is to do exactly what that ApplicationTrait does and just build your own little method to mimic it:

$this->app->instance('middleware.disable', true);

Is all that's happening. I'm not sure if middleware.disable was only introduced in 5.1, but you might give it a shot.