PHP code example of hugomyb / filament-error-mailer
1. Go to this page and download the library: Download hugomyb/filament-error-mailer 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/ */
hugomyb / filament-error-mailer example snippets
return [
'email' => [
'recipient' => ['[email protected]'],
'bcc' => [],
'cc' => [],
'subject' => 'An error has occurred - ' . config('app.name'),
],
'disabledOn' => [
//
],
'cacheCooldown' => 10, // in minutes
'webhooks' => [
'discord' => env('ERROR_MAILER_DISCORD_WEBHOOK'),
// Additional generic webhook URLs the plugin will POST the raw
// error details JSON to. Can also be set via env (CSV).
'endpoints' => array_values(array_filter(array_map('trim', explode(',', (string) env('ERROR_MAILER_WEBHOOK_URLS', ''))))),
'message' => [
'title' => 'Error Alert - ' . config('app.name'),
'description' => 'An error has occurred in the application.',
'error' => 'Error',
'file' => 'File',
'line' => 'Line',
'details_link' => 'See more details'
],
],
'storage_path' => storage_path('app/errors'),
'ignore' => [
'levels' => [
// 'debug',
// 'info',
],
'exceptions' => [
// \Symfony\Component\HttpKernel\Exception\NotFoundHttpException::class,
],
],
];
use Hugomyb\FilamentErrorMailer\FilamentErrorMailerPlugin;
public function panel(Panel $panel): Panel
{
return $panel
// ... other configuration
->plugins([
FilamentErrorMailerPlugin::make(),
]);
}