PHPackages                             sambukhari/laravel-exception-alert - 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. sambukhari/laravel-exception-alert

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

sambukhari/laravel-exception-alert
==================================

Send Laravel exception details directly to your email with simple config toggles.

022PHP

Since Oct 17Pushed 8mo agoCompare

[ Source](https://github.com/sambukhari/laravel-exception-alert)[ Packagist](https://packagist.org/packages/sambukhari/laravel-exception-alert)[ RSS](/packages/sambukhari-laravel-exception-alert/feed)WikiDiscussions main Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

🚨 Laravel Exception Alert
=========================

[](#-laravel-exception-alert)

![License: MIT](https://camo.githubusercontent.com/942e017bf0672002dd32a857c95d66f28c5900ab541838c6c664442516309c8a/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e7376673f7374796c653d666c61742d737175617265) ![Packagist Version](https://camo.githubusercontent.com/11469e5d2ca82d9f2ec48a3ca29fef32c688db74ecaf015d124b4bf8ac5dc8d8/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f73616d62756b686172692f6c61726176656c2d657863657074696f6e2d616c6572742e7376673f7374796c653d666c61742d737175617265)

A lightweight, safe and professional Laravel package that sends exception details to a developer email.
Designed to be non-intrusive: it uses a trait, provides a **one-time installer** for Handler integration, publishes config and views, and includes safe uninstall/rollback.

---

Key features
------------

[](#key-features)

- Trait-based alerting to avoid method collisions with projects that already override `report()`.
- One-time installer command `php artisan exception-alert:install` — **no runtime injection**.
- Publishes config and email view for customization.
- Test command to send a sample alert.
- Uninstall/restore command to safely remove changes.
- Idempotent and creates backups before modifying `app/Exceptions/Handler.php`.

---

Requirements
------------

[](#requirements)

- PHP &gt;= 8.0
- Laravel 8 / 9 / 10 / 11 (or compatible)
- Proper mail configuration in your `.env` (SMTP, Mailgun, SES, etc.)

---

Installation (step-by-step)
---------------------------

[](#installation-step-by-step)

1. **Require the package**

    If the package is on Packagist:

    ```
    composer require sambukhari/laravel-exception-alert
    ```

    If you are installing from your GitHub repository (recommended for testing before publishing):

    1. Add repository entry to your app `composer.json` (optional): ```
        "repositories": [
          {
            "type": "vcs",
            "url": "https://github.com/sambukhari/laravel-exception-alert"
          }
        ]
        ```
    2. Then require the package: ```
        composer require sambukhari/laravel-exception-alert:dev-main --prefer-source
        ```
2. **Run the one-time installer**:

    ```
    php artisan exception-alert:install
    ```

    - Publishes `config/exception-alert.php` and `resources/views/vendor/exception-alert`.
    - Injects the trait into `app/Exceptions/Handler.php`.
    - Creates a timestamped backup.
3. **Set your recipient email** in `.env`:

    ```
    EXCEPTION_ALERT_EMAIL=developer@example.com
    EXCEPTION_ALERT_ENABLED=true
    ```
4. **Test email**:

    ```
    php artisan exception-alert:test
    ```
5. **Clear caches**:

    ```
    php artisan optimize:clear
    composer dump-autoload -o
    ```

---

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

[](#configuration)

```
return [
    'enabled' => env('EXCEPTION_ALERT_ENABLED', true),
    'to' => env('EXCEPTION_ALERT_EMAIL', null),
    'exceptions' => [
        400 => true,
        404 => false,
        500 => true,
    ],
];
```

---

Commands
--------

[](#commands)

CommandDescription`php artisan exception-alert:install`Install and inject trait`php artisan exception-alert:test`Send test alert email`php artisan exception-alert:uninstall`Remove injected trait---

Uninstall / Rollback
--------------------

[](#uninstall--rollback)

```
php artisan exception-alert:uninstall
composer remove sambukhari/laravel-exception-alert
```

---

Contributing
------------

[](#contributing)

1. Fork this repo
2. Create feature branch
3. Submit PR

---

License
-------

[](#license)

This project is open-sourced under the [MIT License](LICENSE).

###  Health Score

17

—

LowBetter than 6% of packages

Maintenance42

Moderate activity, may be stable

Popularity7

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity13

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

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/a0f2c8bbfc847080513be40658cc876e38f263b90f86ebda195c086bf79d02b9?d=identicon)[sambukhari](/maintainers/sambukhari)

---

Top Contributors

[![sambukhari](https://avatars.githubusercontent.com/u/68127570?v=4)](https://github.com/sambukhari "sambukhari (13 commits)")

### Embed Badge

![Health badge](/badges/sambukhari-laravel-exception-alert/health.svg)

```
[![Health](https://phpackages.com/badges/sambukhari-laravel-exception-alert/health.svg)](https://phpackages.com/packages/sambukhari-laravel-exception-alert)
```

###  Alternatives

[psr/log

Common interface for logging libraries

10.4k1.2B11.5k](/packages/psr-log)[open-telemetry/api

API for OpenTelemetry PHP.

1941.5M276](/packages/open-telemetry-api)[open-telemetry/sdk

SDK for OpenTelemetry PHP.

2328.5M343](/packages/open-telemetry-sdk)

PHPackages © 2026

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