sxywy / laravel-runlogs
针对 laravel 编写的一个composer包,主要是记录一些框架运行日志
Installs: 7
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Type:package
Requires
- php: ^8.0.2
- illuminate/support: ^9
Requires (Dev)
- orchestra/testbench: ^7.7|^8.0
README
Install
composer require sxywy/laravel-runlogs
laravel 使用
php artisan vendor:publish
// 选择: Sxywy\LaravelRunLogs\SxywylogsServiceProvider
# 配置全局中间件
在 app/Http/Kernel.php 文件的 $middleware 数组中添加如下一行:
\Sxywy\LaravelRunLogs\Middleware\SxywyRequestLogMiddleware::class,
# 配置 command 任务调度
在 app/Console/Kernel.php 文件的 schedule 方法中添加如下一行:
withoutOverlapping: 避免任务重复
everyMinute: 每分钟执行一次
$schedule->command('SxywyRequestLog')->withoutOverlapping()->everyMinute();
Usage
Write a few lines about the usage of this package.
Testing
Run the tests with:
vendor/bin/phpunit
Changelog
Please see CHANGELOG for more information what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Credits
Security
If you discover any security-related issues, please email sxy@shuxiaoyuan.com instead of using the issue tracker.
License
The MIT License (MIT). Please see License File for more information.