PHP code example of msemeen / laravel-error-reporter
1. Go to this page and download the library: Download msemeen/laravel-error-reporter 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/ */
msemeen / laravel-error-reporter example snippets
// Never miss an error again!
try {
// Your risky code here
} catch (\Exception $e) {
ErrorReporter::report($e); // That's it!
}
// In your exception handler add below function
use Msemeen\ErrorReporter\Facades\ErrorReporter;
public function register()
{
$this->reportable(function (Throwable $e) {
ErrorReporter::report($e);
});
}
// Manually send important notifications
ErrorReporter::send(
'Payment service is down!',
'Critical Service Alert'
);
// In your ServiceProvider or exception handler
ErrorReporter::ignoreExceptions([
\Illuminate\Validation\ValidationException::class,
\Symfony\Component\HttpKernel\Exception\NotFoundHttpException::class,
]);