holystix / error-reporter
通过 HTTP 向远程地址报告异常
v1.0.3
2018-06-20 14:45 UTC
README
- 所需包
composer require cube-agency/error-reporter
- 更新 .env 文件,包含相关的 API URL 和密钥
ERROR_REPORTER_API_URL=xxx
ERROR_REPORTER_API_KEY=yyy
- 在
config/app.php
中注册服务提供者(适用于 Laravel 5.4 及更早版本)
'providers' => [
CubeAgency\ErrorReporter\ErrorReporterServiceProvider::class
- 在
bootstrap/app.php
中绑定异常处理器
$app->singleton(
Illuminate\Contracts\Debug\ExceptionHandler::class,
CubeAgency\ErrorReporter\Exceptions\Handler::class
);
- 通过在
config/error-reporter.php
中创建配置文件来覆盖包默认的配置值(点击查看)