Last active
March 23, 2016 09:46
-
-
Save lagbox/2640b88d27c63fa1c97e to your computer and use it in GitHub Desktop.
Use non exception handling pipeline ?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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