PHP code example of nosun / laravel-api-log-middleware
1. Go to this page and download the library: Download nosun/laravel-api-log-middleware 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/ */
nosun / laravel-api-log-middleware example snippets
$routeMiddleware = [
...
'api_log' => Nosun\ApiLog::class,
]
'api' => [
'driver' => 'single',
'path' => storage_path('logs/api.log'),
'level' => 'debug',
'days' => 1,
]
return [
'enable' => env('API_LOG_ENABLE','false'),
];