holystix/error-reporter

通过 HTTP 向远程地址报告异常

v1.0.3 2018-06-20 14:45 UTC

This package is not auto-updated.

Last update: 2024-09-18 04:13:23 UTC


README

  1. 所需包
composer require cube-agency/error-reporter
  1. 更新 .env 文件,包含相关的 API URL 和密钥
ERROR_REPORTER_API_URL=xxx
ERROR_REPORTER_API_KEY=yyy
  1. config/app.php 中注册服务提供者(适用于 Laravel 5.4 及更早版本)
'providers' => [


   CubeAgency\ErrorReporter\ErrorReporterServiceProvider::class
  1. bootstrap/app.php 中绑定异常处理器
$app->singleton(
    Illuminate\Contracts\Debug\ExceptionHandler::class,
    CubeAgency\ErrorReporter\Exceptions\Handler::class
);

  1. 通过在 config/error-reporter.php 中创建配置文件来覆盖包默认的配置值(点击查看)