PHPackages                             adaptit-darshan/exception-notifier - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Logging &amp; Monitoring](/categories/logging)
4. /
5. adaptit-darshan/exception-notifier

ActiveLibrary[Logging &amp; Monitoring](/categories/logging)

adaptit-darshan/exception-notifier
==================================

Production-ready exception notification system for Laravel 12+ with intelligent rate limiting, critical exception handling, and customizable email templates. Major v2.0 upgrade with modern Laravel 12 support.

v1.2.0(5mo ago)71.2kMITPHPPHP ^7.4|^8.0

Since Sep 12Pushed 5mo ago4 watchersCompare

[ Source](https://github.com/damku999/exception-notifier)[ Packagist](https://packagist.org/packages/adaptit-darshan/exception-notifier)[ RSS](/packages/adaptit-darshan-exception-notifier/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (15)Versions (4)Used By (0)

Laravel Exception Notifier
==========================

[](#laravel-exception-notifier)

[![Latest Version on Packagist](https://camo.githubusercontent.com/8433704b8826a71271b8d0e6d9d5def700fab38f7a9becfdf981216e5a36d3b9/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f64616d6b753939392f657863657074696f6e2d6e6f7469666965722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/damku999/exception-notifier)[![Total Downloads](https://camo.githubusercontent.com/cc7fb41599116cd87f78e667304c027a5e9927ebf4429c0759a4ff42ffe07f14/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f64616d6b753939392f657863657074696f6e2d6e6f7469666965722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/damku999/exception-notifier)[![License](https://camo.githubusercontent.com/9e4540d730f65994608e31916743f137e31c51d4b60f7e9b3bfb14dae209b650/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f64616d6b753939392f657863657074696f6e2d6e6f7469666965722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/damku999/exception-notifier)

> **Version 2.0** - Major upgrade with Laravel 12+ support! 🚀

**Laravel Exception Notifier** is a production-ready exception notification system for Laravel 12+ applications. Get instant email alerts when exceptions occur in your application with intelligent rate limiting, customizable templates, and comprehensive context data.

🆕 What's New in v2.0
--------------------

[](#-whats-new-in-v20)

- ✨ **Laravel 12+ Support** - Modern `bootstrap/app.php` pattern
- ✨ **PHP 8.2+ Required** - Latest PHP features and performance
- ✨ **Per-Signature Rate Limiting** - Each exception tracked separately
- ✨ **Critical Exception Bypass** - Important errors always notify
- ✨ **Enhanced Bot Detection** - Better false positive filtering
- ✨ **Zero-Loop Guarantee** - Fixed infinite loop bug with dependency injection
- ✨ **Email Branding** - Customizable logo, colors, and footer

**Upgrading from v1.x?** See [UPGRADE.md](UPGRADE.md) for migration guide.

✨ Features
----------

[](#-features)

- 🚨 **Instant Email Notifications** - Get notified immediately when exceptions occur
- 🎯 **Smart Rate Limiting** - Per-exception-signature rate limiting to prevent email spam
- 🔥 **Critical Exception Bypass** - Critical exceptions always bypass rate limits
- 📊 **Rich Context Data** - Stack traces, request details, user information, and more
- 🎨 **Customizable Email Templates** - Beautiful, responsive HTML email templates
- 🤖 **Bot Detection** - Automatically ignore exceptions from bots and crawlers
- 🔧 **Artisan Commands** - Manage rate limits and test notifications via CLI
- 🌍 **Environment-Aware** - Silent mode in local environment during development
- 📝 **Detailed Logging** - All exceptions still logged even when email suppressed
- ⚡ **Zero Performance Impact** - Notifications wrapped in try-catch to never break your app

📋 Requirements
--------------

[](#-requirements)

- PHP 8.2 or higher
- Laravel 12.0 or higher
- Mail configuration (SMTP, Mailgun, SES, etc.)

📦 Installation
--------------

[](#-installation)

Install the package via Composer:

```
composer require damku999/exception-notifier
```

### Publish Configuration

[](#publish-configuration)

Publish the configuration file:

```
php artisan vendor:publish --tag="exception-notifier-config"
```

This will create `config/exception_notifier.php` with all available options.

### Publish Email Templates (Optional)

[](#publish-email-templates-optional)

If you want to customize the email templates:

```
php artisan vendor:publish --tag="exception-notifier-views"
```

Templates will be published to `resources/views/vendor/exception-notifier/`.

### Publish Migrations (Optional)

[](#publish-migrations-optional)

If you want to use database-backed rate limiting:

```
php artisan vendor:publish --tag="exception-notifier-migrations"
php artisan migrate
```

⚙️ Configuration
----------------

[](#️-configuration)

### Environment Variables

[](#environment-variables)

Add these to your `.env` file:

```
# Enable exception email notifications (default: false)
EXCEPTION_EMAIL_ENABLED=true

# Silent mode in local environment (default: true)
EXCEPTION_EMAIL_SILENT_LOCAL=true

# Email recipients (comma-separated)
EXCEPTION_EMAIL_TO=admin@example.com,dev@example.com

# Rate limiting (default: 10 emails per hour per signature)
EXCEPTION_EMAIL_MAX_PER_HOUR=10
EXCEPTION_EMAIL_RATE_WINDOW=3600
```

### Basic Setup

[](#basic-setup)

Update your `bootstrap/app.php` to use the exception notifier:

```
