Skip to content

Instantly share code, notes, and snippets.

@lagbox
Last active March 23, 2016 09:46
Show Gist options
  • Save lagbox/2640b88d27c63fa1c97e to your computer and use it in GitHub Desktop.
Save lagbox/2640b88d27c63fa1c97e to your computer and use it in GitHub Desktop.
Use non exception handling pipeline ?
<?php
namespace App\Http;
use Illuminate\Pipeline\Pipeline;
use Illuminate\Support\Facades\Facade;
use Illuminate\Foundation\Http\Kernel as HttpKernel;
class Kernel extends HttpKernel
{
// ...
// copied directly from parent class
protected function sendRequestThroughRouter($request)
{
$this->app->instance('request', $request);
Facade::clearResolvedInstance('request');
$this->bootstrap();
return (new Pipeline($this->app))
->send($request)
->through($this->app->shouldSkipMiddleware() ? [] : $this->middleware)
->then($this->dispatchToRouter());
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment