crows-feet / laravel-http-logger
Laravel request and response logger
dev-master
2020-06-08 02:50 UTC
Requires
- guzzlehttp/guzzle: ^6.3
- nesbot/carbon: ^2.17
This package is auto-updated.
Last update: 2025-06-21 17:03:12 UTC
README
This is a package to log HTTP request and JSON response with Laravel
Installation
Require this package with composer.
composer require crows-feet/laravel-http-logger
Generate a migration and create it
php artisan queue:table php artisan migrate
Configuration
To copy the package config to Laravel with the following publish
command
php artisan vendor:publish --tag="http-logger-config"
Usage
To allow the logger for API routes, add the HttpLogger
middleware to app/Http/Kernel.php
:
protected $middlewareGroups = [ // ... 'api' => [ // ... \CrowsFeet\HttpLogger\Middleware\JsonResponseLogger::class, ], ];
Start processing jobs on the queue as a daemon
php artisan queue:work