bfg / admin-exception-reporter
laravel 的异常报告器
1.0.0
2024-07-17 21:52 UTC
Requires
- php: ^8.0|^8.1
- bfg/admin: ^6.4
This package is auto-updated.
Last update: 2024-09-17 22:11:39 UTC
README
安装
composer require bfg/admin-exception-reporter
管理员安装
php artisan admin:extension bfg/admin-exception-reporter --install
php artisan migrate
打开 app/Exceptions/Handler.php
文件,在 report
方法中调用 Reporter::report()
namespace App\Exceptions; use Admin\Extend\AdminExceptionReporter\Reporter; use Exception; use Illuminate\Auth\AuthenticationException; use Illuminate\Validation\ValidationException; use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler; class Handler extends ExceptionHandler { ... public function report(Exception $exception) { if ($this->shouldReport($exception)) { Reporter::report($exception); } // parent::report($exception); } ... }