laravel-http-logger maintained by jumptwentyfour
Description
A logger middleware for HTTP requests and responses
Author
Last update
2022/06/22 13:23
(dev-main)
License
Downloads
1 329
Tags
Laravel HTTP Logger
Installation
You can install the package via composer:
composer require jumptwentyfour/laravel-http-logger
Optionally you can publish the config file with:
php artisan vendor:publish --provider="JumpTwentyFour\LaravelHttpLogger\ServiceProvider" --tag="config"
Usage
This packages provides a middleware which can be added as a global middleware or as a single route.
// In `app/Http/Kernel.php`
protected $middleware = [
// ...
\JumpTwentyFour\LaravelHttpLogger\Middleware\HttpLogger::class
];
// In a routes file
Route::post(...)->middleware(\JumpTwentyFour\LaravelHttpLogger\Middleware\HttpLogger::class);