roketin / immune
由 Roketin 开发的用于报告 lumen 框架异常的包
v0.0.3
2018-10-04 09:21 UTC
Requires
- guzzlehttp/guzzle: ^6.3
This package is not auto-updated.
Last update: 2024-09-14 08:20:32 UTC
README
由 Roketin 开发的用于报告 lumen 框架异常的包
1. 安装
打开您的命令行控制台,像安装其他 Laravel 包一样输入。
composer require roketin/immune
安装完成后,您需要
php artisan immune-key:generate
将密钥复制到项目中的 .env 文件,并按如下进行配置
APP_URL=http://yourwebsite.com
IMMUNE_API=http://immune.roketin.com
IMMUNE_KEY=YOUR_KEY
然后您需要进入目录 bootstrap/app.php
下的文件 app.php
,应该在注册部分复制以下内容
$app->register(Roketin\Immune\ReportExceptionsServiceProvider::class);
2. 使用方法
在您的处理器 app\Exceptions\Handler.php
中
use Laravel\Lumen\Exceptions\Handler as ExceptionHandler;
改为
use Roketin\Immune\Exceptions\ReportHandler as ExceptionHandler;