PHPackages                             mktmsameera/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. mktmsameera/laravel-error-notifier

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

mktmsameera/laravel-error-notifier
==================================

Multi-platform error notification package for Laravel applications

v2.0.0(8mo ago)09↓100%MITPHPPHP ^8.1CI failing

Since Sep 6Pushed 7mo agoCompare

[ Source](https://github.com/mktmsameera/laravel-error-notifier)[ Packagist](https://packagist.org/packages/mktmsameera/laravel-error-notifier)[ RSS](/packages/mktmsameera-laravel-error-notifier/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)Dependencies (6)Versions (3)Used By (0)

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

[](#laravel-error-notifier)

A comprehensive Laravel package for sending error notifications to multiple platforms including Discord, Slack, WhatsApp, and Email. Get instant alerts when your application encounters critical errors. [Package Documentation](https://packagist.org/packages/mktmsameera/laravel-error-notifier)

Features
--------

[](#features)

- 🚨 **Multi-platform notifications**: Discord, Slack, WhatsApp, Email
- ⚡ **Fail-safe design**: If one service fails, others continue working
- 🎛️ **Highly configurable**: Enable/disable channels, customize messages
- 📊 **Rate limiting**: Prevent notification spam
- 🔄 **Queue support**: Async notifications for better performance
- 🧪 **Built-in testing**: Test your notification channels easily
- 🎯 **Environment filtering**: Different settings per environment
- 📝 **Rich formatting**: Platform-specific message formatting
- 🔍 **Full exception details**: Complete error context and stack traces

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

[](#installation)

Install the package via Composer:

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

Publish the configuration file:

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

Quick Setup
-----------

[](#quick-setup)

### 1. Configure Your Channels

[](#1-configure-your-channels)

Edit `config/error-notifier.php` and enable your desired notification channels:

```
'channels' => [
    'discord' => [
        'enabled' => env('DISCORD_ENABLED', false),
        'webhook_url' => env('DISCORD_WEBHOOK_URL'),
    ],
    'slack' => [
        'enabled' => env('SLACK_ENABLED', false),
        'webhook_url' => env('SLACK_WEBHOOK_URL'),
    ],
    'whatsapp' => [
        'enabled' => env('WHATSAPP_ENABLED', false),
        'provider' => env('WHATSAPP_PROVIDER', 'twilio'),
        // ... provider specific config
    ],
    'email' => [
        'enabled' => env('EMAIL_ENABLED', false),
        'to' => explode(',', env('ERROR_EMAIL_TO', '')),
        'from' => env('ERROR_EMAIL_FROM'),
    ],
],
```

### 2. Set Environment Variables

[](#2-set-environment-variables)

Add your credentials to `.env`:

```
# Discord
DISCORD_ENABLED=true
DISCORD_WEBHOOK_URL=https://discord.com/api/webhooks/your-webhook-url

# Slack
SLACK_ENABLED=true
SLACK_WEBHOOK_URL=https://hooks.slack.com/services/your-webhook-url

# WhatsApp (Twilio)
WHATSAPP_ENABLED=true
WHATSAPP_PROVIDER=twilio
TWILIO_SID=your_twilio_sid
TWILIO_TOKEN=your_twilio_token
TWILIO_WHATSAPP_FROM=whatsapp:+14155238886
TWILIO_WHATSAPP_TO=whatsapp:+1234567890

# Email
EMAIL_ENABLED=true
ERROR_EMAIL_TO=admin@yourapp.com,dev@yourapp.com
ERROR_EMAIL_FROM=errors@yourapp.com
```

### 3. Update Your Exception Handler

[](#3-update-your-exception-handler)

Extend the provided exception handler or add the notification to your existing handler:

**Option A: Extend the provided handler**

```
// app/Exceptions/Handler.php
