Looking to hire Laravel developers? Try LaraJobs

laravel-http-logger maintained by jumptwentyfour

Description
A logger middleware for HTTP requests and responses
Last update
2022/06/22 13:23 (dev-main)
License
Links
Downloads
1 329

Comments
comments powered by Disqus

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);