1. Go to this page and download the library: Download viecngay/lara-except-notify library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
return [
'lara_exception_notify' => [
// allow true or false
// true is enable notify when have exception
// false is disable notify
'enable' => true,
// The channel you want to nofity
'channel' => ['slack'],
// Your slack web hook
// more information about slack web hook: https://api.slack.com/incoming-webhooks
'slack_web_hook_url' => ''
]
];
// use ViecNgay\Laraexcepnotify\Events\HasExceptionEvent;
public function report(Exception $exception)
{
parent::report($exception);
if ($this->shouldReport($exception)) {
event(new HasExceptionEvent($exception));
}
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.