lobotomised / laravel-mailable-exception
Send any exception to an email
Installs: 253
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 1
Language:Blade
Requires
- php: ^8.1
- illuminate/bus: ^10.0|^11.0
- illuminate/contracts: ^10.0|^11.0
- illuminate/mail: ^10.0|^11.0
- illuminate/queue: ^10.0|^11.0
- illuminate/support: ^10.0|^11.0
Requires (Dev)
- larastan/larastan: ^2.9
- laravel/pint: ^1.14
- nunomaduro/collision: ^8.1.1||^7.10.0
- orchestra/testbench: ^9.0.0||^8.22.0
- pestphp/pest: ^2.34
- pestphp/pest-plugin-arch: ^2.7
- pestphp/pest-plugin-laravel: ^2.3
This package is auto-updated.
Last update: 2025-02-03 20:48:25 UTC
README
This is where your description should go. Limit it to a paragraph or two. Consider adding a small example.
Installation
You can install the package via composer:
composer require lobotomised/laravel-mailable-exception
Modifier App\Exceptions\Handler;
public function register(): void { $this->reportable(function (Throwable $e) { (new LaravelMailableException)->toMail($e); }); }
You can publish the config file with:
php artisan vendor:publish --tag="laravel-mailable-exception-config"
This is the contents of the published config file:
return [ 'from' => [ 'address' => env('MAIL_FROM_ADDRESS', 'hello@example.com'), 'name' => env('MAIL_FROM_NAME', 'Example'), ], 'to' => [ 'address' => 'your@example.com', ], 'subject' => 'An exception has occurred', 'allowed_environments' => ['production'], ];
Optionally, you can publish the views using
php artisan vendor:publish --tag="laravel-mailable-exception-views"
License
The MIT License (MIT). Please see License File for more information.