Package Data | |
---|---|
Maintainer Username: | chentsulin |
Package Create Date: | 2015-03-10 |
Package Last Update: | 2016-11-02 |
Home Page: | |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2024-12-14 15:01:46 |
Package Statistics | |
---|---|
Total Downloads: | 14 |
Monthly Downloads: | 0 |
Daily Downloads: | 0 |
Total Stars: | 2 |
Total Watchers: | 2 |
Total Forks: | 1 |
Total Open Issues: | 1 |
Set
X-Response-Time
to response header
$ composer require lara-middleware/request-id
or add
"lara-middleware/response-time": "dev-master"
to package.json
> "require"
Add 'LaraMiddleware\RequestId\RequestId'
as Kernel's first middleware:
// app/Http/Kernel.php
protected $middleware = [
'LaraMiddleware\RequestId\RequestId',
....
]
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()
{
//
}]);
MIT © C. T. Lin