slgo99/laravel-error-report
最新稳定版本:v1.0.3
Composer 安装命令:
composer require slgo99/laravel-error-report
包简介
Get to know what's happening in your production environment!
README 文档
README
Get to know what's happening in your production environment!
Warning
For the package to work you need to have a mail configuration set up in your Laravel application.
What It Does
This package allows you to get e-mail notifications when an error occurs in your production environment.
Installation
You can install the package via composer:
composer require slgo99/laravel-error-report
As Laravel uses Package auto-discovery, you don't need to manually add the service provider. If you don't use auto-discovery, you can add the service provider to the providers list in bootstrap/providers.php:
return [ App\Providers\AppServiceProvider::class, // ... Slgo99\LaravelErrorReport\ServiceProvider::class, ];
In older versions of Laravel, you can add the service provider to the providers list in config/app.php:
'providers' => [ // ... Slgo99\LaravelErrorReport\ServiceProvider::class, ],
Optionally, you can publish the configuration file with:
php artisan vendor:publish --provider="Slgo99\LaravelErrorReport\ServiceProvider" --tag="config"
After publishing the configuration file, you can find it in config/error_report.php.
return [ /** * Enable or disable the error report */ 'enabled' => env('ERROR_REPORT_ENABLED', false), /** * The emails to send the error report */ 'emails' => env('ERROR_REPORT_EMAILS', ''), ];
Usage
To enable the e-mail notifications, you need to set the following environment variables in your .env file:
Enable the error report:
ERROR_REPORT_ENABLED=true
Set the e-mail where you want to receive the error reports:
Note
Note that you can set multiple e-mails separated by commas.
ERROR_REPORT_EMAILS=johndoe@example.com,janedoe@example.com
That's it! Now you will receive an e-mail notification whenever an error occurs in your production environment.
统计信息
- 总下载量: 691
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-11-16