PHPackages                             saif/laravel-error-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. [Mail &amp; Notifications](/categories/mail)
4. /
5. saif/laravel-error-notifier

ActiveLibrary[Mail &amp; Notifications](/categories/mail)

saif/laravel-error-notifier
===========================

Automatically send email notifications when exceptions occur in your Laravel application.

00PHP

Since Apr 21Pushed 3mo agoCompare

[ Source](https://github.com/muhammadsaifullah360/laravel-error-notifier)[ Packagist](https://packagist.org/packages/saif/laravel-error-notifier)[ RSS](/packages/saif-laravel-error-notifier/feed)WikiDiscussions main Synced 3w ago

READMEChangelogDependenciesVersions (1)Used By (0)

Laravel Error Notifier
======================

[](#laravel-error-notifier)

Automatically sends a beautifully formatted email whenever an unhandled exception occurs in your Laravel application.

Compatible with **Laravel 9, 10, 11, and 12**.

---

Features
--------

[](#features)

- Zero-config setup — works out of the box
- Add multiple recipient email addresses via config or `.env`
- Throttle duplicate error emails (configurable cool-down period)
- Ignore specific exception classes (404s, validation errors, etc.)
- Includes full context: exception details, request URL/method/input, authenticated user, stack trace
- Sensitive fields (passwords, tokens) are automatically masked
- Never crashes your application — all notifier errors are silently caught

---

Installation
------------

[](#installation)

```
composer require saif/laravel-error-notifier
```

The service provider is auto-discovered via Laravel's package discovery. No manual registration needed.

### Publish the config file

[](#publish-the-config-file)

```
php artisan vendor:publish --tag=error-notifier-config
```

This creates `config/error-notifier.php` in your application.

---

Configuration
-------------

[](#configuration)

### Option 1 — via `.env` (quickest)

[](#option-1--via-env-quickest)

```
ERROR_NOTIFIER_ENABLED=true
ERROR_NOTIFIER_RECIPIENTS=admin@example.com,dev@example.com
ERROR_NOTIFIER_FROM_ADDRESS=noreply@example.com
ERROR_NOTIFIER_FROM_NAME="My App Errors"
ERROR_NOTIFIER_SUBJECT_PREFIX=[ERROR]
ERROR_NOTIFIER_THROTTLE=5
```

### Option 2 — via `config/error-notifier.php`

[](#option-2--via-configerror-notifierphp)

```
return [
    'enabled' => true,

    'recipients' => [
        'admin@example.com',
        'dev@example.com',
    ],

    'from' => [
        'address' => 'noreply@example.com',
        'name'    => 'Error Notifier',
    ],

    'subject_prefix' => '[ERROR]',

    // Exception classes that will NOT send an email
    'ignore' => [
        Symfony\Component\HttpKernel\Exception\NotFoundHttpException::class,
        Illuminate\Validation\ValidationException::class,
    ],

    // Minutes before the same error can trigger another email (0 = disabled)
    'throttle_minutes' => 5,

    // Include sanitized request input in the email
    'include_input' => true,

    // Fields to mask in request input
    'hidden_fields' => ['password', 'token', 'secret'],
];
```

---

Email Contents
--------------

[](#email-contents)

Each notification email includes:

SectionDetails**Exception**Class, message, file, line number, code**Application**Environment, app URL, running context, PHP version**Request**Full URL, HTTP method, IP address, user agent, referer**User**Authenticated user ID, name, and email**Input**Sanitized request input (sensitive fields masked)**Stack Trace**Full exception stack trace---

Customising the Email Template
------------------------------

[](#customising-the-email-template)

Publish the views to customise the HTML email template:

```
php artisan vendor:publish --tag=error-notifier-views
```

The template will be copied to `resources/views/vendor/error-notifier/emails/error.blade.php`.

---

Ignoring Exceptions
-------------------

[](#ignoring-exceptions)

Add exception classes to the `ignore` array in the config. These will never send an email:

```
'ignore' => [
    Illuminate\Auth\AuthenticationException::class,
    Illuminate\Validation\ValidationException::class,
    Symfony\Component\HttpKernel\Exception\NotFoundHttpException::class,
    App\Exceptions\MyCustomException::class,
],
```

---

Throttling
----------

[](#throttling)

To prevent your inbox from being flooded during an outage, identical errors (same class + message) are throttled. The default is 5 minutes — set `throttle_minutes` to `0` to disable.

> Throttling uses Laravel's cache. Make sure your cache driver is not `array` in production.

---

License
-------

[](#license)

MIT — [Muhammad Saif Ullah](mailto:muhammadsaif.dev@gmail.com)

###  Health Score

18

—

LowBetter than 7% of packages

Maintenance55

Moderate activity, may be stable

Popularity0

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity12

Early-stage or recently created project

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/f0f98903bb2f11f878685e55cbcf6596368a1dd41337b9890a3da991fa368f83?d=identicon)[muhammadsaifullah360](/maintainers/muhammadsaifullah360)

### Embed Badge

![Health badge](/badges/saif-laravel-error-notifier/health.svg)

```
[![Health](https://phpackages.com/badges/saif-laravel-error-notifier/health.svg)](https://phpackages.com/packages/saif-laravel-error-notifier)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
