PHP code example of softonic / laravel-middleware-request-id
1. Go to this page and download the library: Download softonic/laravel-middleware-request-id library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
softonic / laravel-middleware-request-id example snippets
protected $middleware = [
\Softonic\Laravel\Middleware\RequestId::class,
....
]
// Example for WEB group
protected $middlewareGroups = [
'web' => [
\Softonic\Laravel\Middleware\RequestId::class,
...
],
'api' => [
...
],
];
protected $routeMiddleware = [
...
'request-id' => Softonic\Laravel\Middleware\RequestId::class,
];
Route::get('route', function() {})->middleware('request-id');