designmynight/laravel-log-mailer
最新稳定版本:v2.0.0
Composer 安装命令:
composer require designmynight/laravel-log-mailer
包简介
A package to support logging via email in Laravel
README 文档
README
A service provider to add support for logging via email using Laravels built-in mail provider
Table of contents
Installation
Installation using composer:
composer require designmynight/laravel-log-mailer
Laravel version Compatibility
| Laravel | Package |
|---|---|
| 5.6.x | 1.0.x |
And add the service provider in config/app.php:
DesignMyNight\Laravel\Logging\MailableLogServiceProvider::class,
For usage with Lumen, add the service provider in bootstrap/app.php.
$app->register(DesignMyNight\Laravel\Logging\MailableLogServiceProvider::class);
Configuration
Most configuration options can be automatically populated by environment variables or in config/mailablelog.php, to generate it run php artisan vendor:publish.
To ensure all unhandled exceptions are mailed, set up a mail logging channel and add it to your logging stack in config/logging.php:
'channels' => [ 'stack' => [ 'driver' => 'stack', // Add mail to the stack: 'channels' => ['single', 'mail'], ], // ... // Create a mail logging channel: 'mail' => [ 'driver' => 'mail', // Specify who to mail the log to 'to' => [ [ 'address' => 'errors@designmynight.com', 'name' => 'Error' ] ], // Optionally specify who the log mail was sent by // This is overidable in config/mailablelog.php and // falls back to your global from in config/mail.php 'from' => [ 'address' => 'errors@designmynight.com', 'name' => 'Errors' ], // Optionally overwrite the mailable template // 'mailable' => NewLogMailable::class ], ],
You can specify multiple channels and change the recipients and customise the email template per channel.
统计信息
- 总下载量: 36.42k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 15
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2018-09-04
