gpxcat / laravel_access_log
There is no license information available for the latest version (1.0.1) of this package.
自製的 Laravel HTTP 傳輸記錄
1.0.1
2022-05-03 08:45 UTC
README
migrate:
php artisan migrate
Add the environment variable to your .env
file:
# 是否記錄(總開關)
ACCESS_LOG=1
# 設定不要記錄的ACCESSLOG用逗號 ex GET,HEAD
ACCESS_LOG_SKIP_METHOD=GET
Add the routeMiddleware to your app/Http/Kernel.php
file:
protected $routeMiddleware = [
...
'accesslog.handle' => \Gpxcat\LaravelAccessLog\Http\Middleware\AccessLogHandle::class,
...
];
Add the middleware to your routes/web.php
or routes/api.php
file:
Route::group([
'prefix' => 'XXXX',
'middleware' => [
'accesslog.handle',
],
], function () {
...
});