michelmelo / laravel-request-logging
Write all incoming requests and there responses
1.0.3
2023-11-18 15:13 UTC
Requires
- illuminate/support: ~5|~6|~7|~8|~9|~10
- laravel/framework: ~5|~6|~7|~8|~9|~10
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.6
- mockery/mockery: ^1.5
- orchestra/database: ^6.0
- orchestra/testbench: ^6.24
- phpunit/phpunit: ^9.5
- sempro/phpunit-pretty-print: ^1.4
- timacdonald/log-fake: ^1.9
README
This Laravel package contains middleware to log requests and there responses including all parameters.
Installation
You can install using composer
composer require michelmelo/laravel-request-logging
Next step is to add the middleware in your app/Http/Kernel.php file.
Add the request logging to all routes:
protected $middleware = [
...
\MichelMelo\RequestLogging\LogRequest::class,
...
];
Or you only for specific route(group)s.
protected $routeMiddleware = [
...
'logRequest' => \MichelMelo\RequestLogging\LogRequest::class,
...
];
Finally, although optionally, you can publish the configuration file:
php artisan vendor:publish --provider="MichelMelo\RequestLogging\RequestLoggingServiceProvider"