gpxcat/laravel_access_log is a Laravel package for 自製的 laravel http 傳輸記錄.
It currently has 0 GitHub stars and 423 downloads on Packagist (latest version 1.0.1).
Install it with composer require gpxcat/laravel_access_log.
Discover more Laravel packages by gpxcat
or browse all Laravel packages to compare alternatives.
Last updated
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 () {
...
});