dragon-code/notify-exceptions
dragon-code/notify-exceptions is a Laravel package that automatically sends notifications when application exceptions occur. Configure notification channels, recipients, and filters to get timely, noise-free alerts about errors in production.
Treat this as a legacy package. It is archived, last released in January 2022, and has essentially no adoption. Before adding it to a new project, confirm it still installs against your Laravel/PHP version with composer require dragon-code/notify-exceptions; if it conflicts, do not fight it—use Laravel’s native exception reporting plus Notification instead.
Minimal setup:
php artisan vendor:publish and select the notify-exceptions entry.config/notify-exceptions.php first. That file is the source of truth for enabled channels, recipients, and message formatting..env—admin email, chat webhook, bot token, etc.—not directly in config.php artisan config:clear.The first practical use case is production 500 monitoring: an unhandled exception in a request, queue job, or scheduled task should notify the on-call admin through email or a chat channel. Check the package README and vendor/dragon-code/notify-exceptions/ next; if the package does not auto-hook into Laravel’s exception handler, wire it from App\Exceptions\Handler::register() using reportable().
Use the package as a reporting side-channel, not as your rendering path. Notify from the exception handler’s report()/reportable() flow so the user still receives the normal HTTP response.
public function register(): void
{
$this->reportable(function (Throwable $e) {
// If the package exposes a notifier/hook, call it here.
// Otherwise keep the package out of the hot path and use Laravel notifications.
});
}
Day-to-day patterns that work well:
$dontReport list or the package’s ignore configuration.MAIL_MAILER=log or Mailpit locally, then send one real notification from staging before enabling production.try/catch, log the failure, and never rethrow from the notifier..env or package config, run php artisan config:clear and rebuild with php artisan config:cache. Queued workers may keep old config until restarted.From address, and throttle chat webhooks.report()/reportable(), not in render(). Rendering should only decide the HTTP response.storage/logs/laravel.log, check config('notify-exceptions') in php artisan tinker, verify the queue worker, confirm the channel credentials, and throw a controlled exception in staging. If the package exposes a test command, use it; otherwise a deliberate throw new RuntimeException('notify-exceptions test') is the quickest end-to-end check.How can I help you explore Laravel packages today?