acolyte/laravel-errorlog

错误日志 - - 一个简单的Laravel包。

v1.2 2021-01-02 13:38 UTC

This package is auto-updated.

Last update: 2024-09-24 11:59:03 UTC


README

步骤 1: composer require acolyte/laravel-errorlog

步骤 2: php artisan vendor:publish

步骤 3: php artisan migrate

步骤 4: php artisan config:cache

步骤 5: 使用以下配置更新 .env 文件

MAIL_FROM_ADDRESS=

MAIL_FROM_NAME=

MAIL_TO_ADDRESS=

MAIL_CC_ADDRESS=

ROUTE_PREFIX=

MIDDLEWARE=

步骤 6: use Acolyte\ErrorLog\Helpers\SendMails;

步骤 7

try {

// TODO

}catch ( \Exception $e) {

SendMails::sendErrorMail($e->getMessage(), null, 'ErrorLogController', 'errorLogs', $e->getLine(), $e->getFile(), '', '', '', ');

return back();

}