programic / laravel-tools
Laravel 扩展
v3.1.1
2024-03-22 10:39 UTC
Requires
- php: ^7.2|^8.0
- barryvdh/laravel-debugbar: ^3.9
- laravel/framework: ^6.0|^7.0|^8.0|^9.0|^10.0|^11.0
- sentry/sentry-laravel: ^2.14|^3.2|^4.3
- spatie/laravel-health: ^1.22
Requires (Dev)
- orchestra/testbench: ^3.8|^4.0|^5.0|^6.0|^7.1|^8.0
- phpunit/phpunit: ^8.5.23 || ^9.5.10
README
此包是 Laravel 扩展
安装
此包需要 PHP 5.6 和 Laravel 5.0 或更高版本。
composer require programic/laravel-tools
使用方法
Sentry
Laravel 11+
将此链添加到 bootstrap/app.php
中的 Application 中
->withExceptions(function (Exceptions $exceptions) { Integration::handles($exceptions); })
Laravel 8 - 10
替换 App\Exceptions\Handler
中的 report 方法
public function report(Exception $exception) { if ($this->shouldReport($exception) && app()->bound('sentry')) { app('sentry')->captureException($exception); } parent::report($exception); }
MySQL 支持
在您的 config/app.php
中添加 Mysql8ServiceProvider
以添加对迁移的 MySQL 8 支持
将调试数据添加到 API 响应中
将 Programic\Tools\Middleware\DebugBarMeta
添加为您的 API 组 App/Http/Kernel.php
中的中间件,以将调试数据添加到每个响应中
Vue 包
使用我们的 Vue 插件将此调试数据添加到 Vue Devtools: https://github.com/programic/api-debugbar-vue-devtools
测试
composer test
变更日志
有关最近更改的更多信息,请参阅 CHANGELOG
贡献
有关详细信息,请参阅 CONTRIBUTING
安全性
如果您发现任何与安全性相关的问题,请通过电子邮件 info@programic.com 联系我们,而不是使用问题跟踪器。
鸣谢
许可
MIT 许可证 (MIT)。有关更多信息,请参阅 许可文件