flynn314/request-logger

1.1.2 2024-07-31 10:46 UTC

This package is auto-updated.

Last update: 2024-10-31 00:27:43 UTC


README

  1. Publish migration
php artisan migrate
  1. Add necessary records to middlewareAliases in Kernel.
'api.log.request' => LogRequest::class,
'api.log.response' => LogResponse::class,
  1. Usage something like this:
Route::middleware(['api.log.request'])->group(function () {
    Route::get('path/to/your/action', [SomeControllerController::class, 'action'])->middleware('api.log.response');
});