lara-middleware / request-id
Laravel 5 RequestId Middleware
dev-master
2015-03-11 18:09 UTC
Requires
- php: >=5.4
- illuminate/contracts: ~5.0
- rhumsaa/uuid: ~2.8
Requires (Dev)
- illuminate/http: ~5.1@dev
- phpspec/phpspec: ~2.0
This package is not auto-updated.
Last update: 2024-12-25 07:50:47 UTC
README
Set
X-Response-Time
to response header
Install
$ composer require lara-middleware/request-id
or add
"lara-middleware/response-time": "dev-master"
to package.json
> "require"
Usage
For all routes
Add 'LaraMiddleware\RequestId\RequestId'
as Kernel's first middleware:
// app/Http/Kernel.php protected $middleware = [ 'LaraMiddleware\RequestId\RequestId', .... ]
For specific routes
Add 'response-time' => 'LaraMiddleware\RequestId\RequestId',
to route middleware:
// app/Http/Kernel.php protected $routeMiddleware = [ 'response-time' => 'LaraMiddleware\RequestId\RequestId', .... ]
Then, use with routes:
Route::get('some-specific', ['middleware' => 'request-id', function() { // }]);
License
MIT © C. T. Lin