-
-
Save juan55860/51df4af93626f407ddda to your computer and use it in GitHub Desktop.
newrelic patch for laravel5.2
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\Middleware; | |
use Closure; | |
class NewRelicPatch | |
{ | |
public function handle($request, Closure $next) | |
{ | |
$response = $next($request); | |
event('router.filter:after:newrelic-patch', [$request, $response], true); | |
return $response; | |
} | |
} |
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 | |
Route::macro('after', function ($callback) { | |
$this->events->listen('router.filter:after:newrelic-patch', $callback); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment