PHP code example of flynn314 / request-logger
1. Go to this page and download the library: Download flynn314/request-logger library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
flynn314 / request-logger example snippets
'api.log.request' => LogRequest::class,
'api.log.response' => LogResponse::class,
Route::middleware(['api.log.request'])->group(function () {
Route::get('path/to/your/action', [SomeControllerController::class, 'action'])->middleware('api.log.response');
});
shell
php artisan migrate