PHPackages                             errly/laravel-errly - 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. errly/laravel-errly

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

errly/laravel-errly
===================

Error monitoring with beautiful Slack notifications for Laravel applications

v1.0.3(2mo ago)12.8k↓43.9%[3 PRs](https://github.com/jeromecoloma/laravel-errly/pulls)MITPHPPHP ^8.2CI passing

Since Jul 12Pushed 1mo agoCompare

[ Source](https://github.com/jeromecoloma/laravel-errly)[ Packagist](https://packagist.org/packages/errly/laravel-errly)[ Docs](https://github.com/jeromecoloma/laravel-errly)[ GitHub Sponsors](https://github.com/sponsors/jeromecoloma)[ RSS](/packages/errly-laravel-errly/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)Dependencies (26)Versions (12)Used By (0)

✨ **Why Laravel Errly?**
------------------------

[](#-why-laravel-errly)

- 🚨 **Instant Slack alerts** - Get notified the moment errors happen
- ⚡ **Simple setup** - Add one line to `bootstrap/app.php` and configure your webhook
- 🎨 **Beautiful notifications** - Rich, actionable Slack messages with context
- 🛡️ **Smart filtering** - Only get alerts for errors that matter
- 🚀 **Laravel 12 native** - Built for modern Laravel architecture
- 🆓 **Free &amp; open source** - No subscription fees or limits

> **Note**: Currently# 🚨 Laravel Errly

[![Latest Version on Packagist](https://camo.githubusercontent.com/d214c041ea36577be36f2ada5fe4aa02f88be08588f2905a06b064b12e71416d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6572726c792f6c61726176656c2d6572726c792e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/errly/laravel-errly)[![Total Downloads](https://camo.githubusercontent.com/7349b837fe33f780ed9aedc4b80617647d32f4fb8485c4affc93bbf31e584799/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6572726c792f6c61726176656c2d6572726c792e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/errly/laravel-errly)[![GitHub Tests Action Status](https://camo.githubusercontent.com/bc4883be8cd79d8275e599bab43f09569c916bda3b87396807f8cc19c9fc7d73/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6a65726f6d65636f6c6f6d612f6c61726176656c2d6572726c792f74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/jeromecoloma/laravel-errly/actions?query=workflow%3Atests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/4c1d460a234ee60659530724a74ec8400decf608ad2af902ad705b0d30e0299e/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6a65726f6d65636f6c6f6d612f6c61726176656c2d6572726c792f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/jeromecoloma/laravel-errly/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amain)

**Early error detection and beautiful Slack notifications for Laravel 12 applications.**

Laravel Errly is the simplest way to get **instant Slack notifications** when critical errors occur in your Laravel application. Built specifically for Laravel 12's modern architecture with **minimal setup** - just one line of code and a Slack webhook.

---

✨ **Why Laravel Errly?**
------------------------

[](#-why-laravel-errly-1)

- 🚨 **Instant Slack alerts** - Get notified the moment errors happen
- ⚡ **Simple setup** - Add one line to `bootstrap/app.php` and configure your webhook
- 🎨 **Beautiful notifications** - Rich, actionable Slack messages with context
- 🛡️ **Smart filtering** - Only get alerts for errors that matter
- 🚀 **Laravel 12 native** - Built for modern Laravel architecture
- 🆓 **Free &amp; open source** - No subscription fees or limits

> **📢 Currently supports Slack notifications.** Discord, Teams, and email support are planned for future releases.

---

🎯 **Quick Start**
-----------------

[](#-quick-start)

Get Laravel Errly running in **under 2 minutes**:

### **1. Install**

[](#1-install)

```
composer require errly/laravel-errly
```

### **2. Publish Config**

[](#2-publish-config)

```
php artisan vendor:publish --tag=laravel-errly-config
```

### **3. Add Your Slack Webhook**

[](#3-add-your-slack-webhook)

```
# .env
ERRLY_SLACK_WEBHOOK_URL=https://hooks.slack.com/services/YOUR/WEBHOOK/URL
```

### **4. Enable in Bootstrap**

[](#4-enable-in-bootstrap)

```
// bootstrap/app.php
use Errly\LaravelErrly\ErrlyServiceProvider;

return Application::configure(basePath: dirname(__DIR__))
    // ... other configuration
    ->withExceptions(function (Exceptions $exceptions): void {
        // Only configure Errly if the package is installed
        if (class_exists(ErrlyServiceProvider::class)) {
            ErrlyServiceProvider::configureExceptions($exceptions);
        }
    })
    ->create();
```

### **5. Test It!**

[](#5-test-it)

```
php artisan errly:test
```

**That's it!** You'll receive a beautiful Slack notification with error details.

---

📱 **What Your Slack Notifications Look Like**
---------------------------------------------

[](#-what-your-slack-notifications-look-like)

When an error occurs, you'll receive rich notifications like this:

```
🚨 **CRITICAL Error in MyApp Production**

🔍 Error Details
Exception: Illuminate\Database\QueryException
Message: SQLSTATE[42S02]: Base table or view not found
File: /app/Http/Controllers/UserController.php
Line: 42
URL: https://myapp.com/users/123
Method: GET
User: john@example.com (ID: 1234)
Environment: production
Server: web-01

📋 Stack Trace
#0 /app/Http/Controllers/UserController.php(42): ...
#1 /app/vendor/laravel/framework/src/...
[... truncated]

```

---

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

[](#️-configuration)

Laravel Errly works great out of the box, but you can customize everything:

```
// config/errly.php
return [
    'enabled' => env('ERRLY_ENABLED', true),

    'slack' => [
        'webhook_url' => env('ERRLY_SLACK_WEBHOOK_URL'),
        'channel' => env('ERRLY_SLACK_CHANNEL', '#errors'),
        'username' => env('ERRLY_SLACK_USERNAME', 'Laravel Errly'),
        'emoji' => env('ERRLY_SLACK_EMOJI', '🚨'),
    ],

    'filters' => [
        'environments' => [
            'enabled' => env('ERRLY_FILTER_ENVIRONMENTS', true),
            'allowed' => explode(',', env('ERRLY_ALLOWED_ENVIRONMENTS', 'production,staging')),
        ],

        // Automatically ignores noise like 404s, validation errors
        'ignored_exceptions' => [
            \Illuminate\Validation\ValidationException::class,
            \Symfony\Component\HttpKernel\Exception\NotFoundHttpException::class,
            // ... more
        ],

        // High-priority alerts for critical errors
        'critical_exceptions' => [
            \Illuminate\Database\QueryException::class,
            \ErrorException::class,
            // ... more
        ],
    ],

    'rate_limiting' => [
        'enabled' => env('ERRLY_RATE_LIMITING', true),
        'max_per_minute' => env('ERRLY_MAX_PER_MINUTE', 10),
    ],
];
```

---

🚀 **Usage Examples**
--------------------

[](#-usage-examples)

### **Environment Variables**

[](#environment-variables)

```
# Basic Setup
ERRLY_ENABLED=true
ERRLY_SLACK_WEBHOOK_URL=https://hooks.slack.com/services/T.../B.../xxx

# Advanced Configuration
ERRLY_SLACK_CHANNEL=#production-errors
ERRLY_SLACK_USERNAME="MyApp Alerts"
ERRLY_SLACK_EMOJI=⚠️

# Environment Filtering (only report in production)
ERRLY_FILTER_ENVIRONMENTS=true
ERRLY_ALLOWED_ENVIRONMENTS=production,staging

# Rate Limiting (prevent spam)
ERRLY_RATE_LIMITING=true
ERRLY_MAX_PER_MINUTE=5

# Custom App Name
ERRLY_APP_NAME="My Awesome App"
```

### **Manual Error Reporting**

[](#manual-error-reporting)

```
use Errly\LaravelErrly\Facades\Errly;

try {
    // Risky operation
    $result = $this->processPayment($amount);
} catch (PaymentException $e) {
    // Report with custom context
    Errly::report($e, [
        'user_id' => auth()->id(),
        'amount' => $amount,
        'payment_method' => 'stripe',
    ]);

    // Handle gracefully
    return response()->json(['error' => 'Payment failed'], 500);
}
```

### **Testing Different Error Types**

[](#testing-different-error-types)

```
# Test general errors
php artisan errly:test

# Test critical errors (database, fatal errors)
php artisan errly:test critical

# Test validation errors (should be ignored)
php artisan errly:test validation

# Test custom errors
php artisan errly:test custom
```

---

🛡️ **Security Features**
------------------------

[](#️-security-features)

Laravel Errly automatically protects sensitive data:

- **🔒 Redacts passwords** - Never exposes authentication data
- **🔒 Filters headers** - Removes authorization tokens
- **🔒 Configurable sensitive fields** - Define your own protected fields
- **🔒 Safe by default** - Conservative data collection

```
// Sensitive fields are automatically redacted
'sensitive_fields' => [
    'password',
    'password_confirmation',
    'token',
    'api_key',
    'credit_card',
    'ssn',
],
```

---

⚡ **Performance**
-----------------

[](#-performance)

Laravel Errly is designed for **zero performance impact**:

- **Async notifications** - Won't slow down your app
- **Smart rate limiting** - Prevents notification spam
- **Efficient filtering** - Only processes errors that matter
- **Minimal memory usage** - Lightweight error context collection

---

🎛️ **Advanced Features**
------------------------

[](#️-advanced-features)

### **Severity Levels**

[](#severity-levels)

Errors are automatically categorized:

- **🔴 CRITICAL** - Database errors, fatal errors, parse errors
- **🟡 HIGH** - HTTP 500+ errors
- **🟢 MEDIUM** - General exceptions, runtime errors

### **Context Collection**

[](#context-collection)

Rich error context includes:

- **Request details** - URL, method, IP, user agent
- **User information** - ID, email, name (if authenticated)
- **Server information** - Hostname, environment
- **Stack traces** - Full error traces (configurable length)

### **Smart Filtering**

[](#smart-filtering)

Automatically ignores noise:

- ✅ **404 errors** - Page not found
- ✅ **Validation errors** - Form validation failures
- ✅ **Auth errors** - Login failures
- ✅ **Rate limiting errors** - Too many requests

---

🧪 **Testing**
-------------

[](#-testing)

Laravel Errly includes comprehensive testing tools:

```
# Test your Slack integration
php artisan errly:test

# Test specific error types
php artisan errly:test database
php artisan errly:test critical
php artisan errly:test validation

# Run the package test suite
composer test

# Check code quality
composer analyse
```

---

📋 **Requirements**
------------------

[](#-requirements)

- **PHP 8.2+**
- **Laravel 12+**
- **Slack workspace** with webhook URL (Discord, Teams, Email coming soon)

---

🔧 **Installation &amp; Setup**
------------------------------

[](#-installation--setup)

### **Step 1: Install Package**

[](#step-1-install-package)

```
composer require errly/laravel-errly
```

### **Step 2: Publish Configuration**

[](#step-2-publish-configuration)

```
php artisan vendor:publish --tag=laravel-errly-config
```

### **Step 3: Create Slack Webhook**

[](#step-3-create-slack-webhook)

1. Go to [Slack API Apps](https://api.slack.com/apps)
2. Create new app → "From scratch"
3. Enable "Incoming Webhooks"
4. Add webhook to your desired channel
5. Copy the webhook URL

### **Step 4: Configure Environment**

[](#step-4-configure-environment)

```
ERRLY_ENABLED=true
ERRLY_SLACK_WEBHOOK_URL=https://hooks.slack.com/services/YOUR/WEBHOOK/URL
ERRLY_SLACK_CHANNEL=#errors
```

### **Step 5: Enable Exception Handling**

[](#step-5-enable-exception-handling)

```
// bootstrap/app.php
use Errly\LaravelErrly\ErrlyServiceProvider;

return Application::configure(basePath: dirname(__DIR__))
    ->withExceptions(function (Exceptions $exceptions): void {
        // Only configure Errly if the package is installed
        if (class_exists(ErrlyServiceProvider::class)) {
            ErrlyServiceProvider::configureExceptions($exceptions);
        }
    })
    ->create();
```

### **Step 6: Test**

[](#step-6-test)

```
php artisan errly:test
```

Check your Slack channel for the test notification!

---

🤝 **Contributing**
------------------

[](#-contributing)

We love contributions! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for details.

### **Development Setup**

[](#development-setup)

```
git clone https://github.com/jeromecoloma/laravel-errly.git
cd laravel-errly
composer install
composer test
```

### **Running Tests**

[](#running-tests)

```
composer test          # Run test suite
composer analyse       # Static analysis
composer format         # Code formatting
```

---

📝 **Changelog**
---------------

[](#-changelog)

Please see [CHANGELOG.md](CHANGELOG.md) for recent changes.

---

🛠️ **Troubleshooting**
----------------------

[](#️-troubleshooting)

### **Not receiving Slack notifications?**

[](#not-receiving-slack-notifications)

**1. Check your webhook URL**

```
# Test with curl
curl -X POST -H 'Content-type: application/json' \
  --data '{"text":"Test from curl"}' \
  YOUR_WEBHOOK_URL
```

**2. Verify configuration**

```
php artisan tinker
>>> config('errly.enabled')
>>> config('errly.slack.webhook_url')
```

**3. Check Laravel logs**

```
tail -f storage/logs/laravel.log
```

**4. Test manually**

```
use Errly\LaravelErrly\Facades\Errly;
Errly::report(new Exception('Manual test'));
```

### **Too many notifications?**

[](#too-many-notifications)

Enable rate limiting:

```
ERRLY_RATE_LIMITING=true
ERRLY_MAX_PER_MINUTE=5
```

### **Notifications in development?**

[](#notifications-in-development)

Use environment filtering:

```
ERRLY_FILTER_ENVIRONMENTS=true
ERRLY_ALLOWED_ENVIRONMENTS=production,staging
```

---

📄 **License**
-------------

[](#-license)

Laravel Errly is open-sourced software licensed under the [MIT license](LICENSE.md).

---

🙏 **Credits**
-------------

[](#-credits)

- **Jerome Coloma** - Creator and maintainer
- **Laravel Community** - Inspiration and feedback
- **Spatie** - Package development tools

---

💝 **Support**
-------------

[](#-support)

If Laravel Errly helps you catch errors early, consider:

- ⭐ **Starring the repo** on GitHub
- 🐦 **Sharing on Twitter** with #LaravelErrly
- 📝 **Writing a blog post** about your experience
- 💬 **Joining discussions** in Issues

---

**Built with ❤️ for the Laravel community**

[⭐ Star on GitHub](https://github.com/jeromecoloma/laravel-errly) • [📦 View on Packagist](https://packagist.org/packages/errly/laravel-errly) • [🐛 Report Issues](https://github.com/jeromecoloma/laravel-errly/issues) • [💬 Discussions](https://github.com/jeromecoloma/laravel-errly/discussions)

###  Health Score

47

—

FairBetter than 94% of packages

Maintenance87

Actively maintained with recent releases

Popularity23

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

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.

###  Release Activity

Cadence

Every ~77 days

Total

4

Last Release

77d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/6f31647cebdf05c5b4d8a88d75a0519571e2c5056efc1c5719653754b38c5de9?d=identicon)[jeromecoloma](/maintainers/jeromecoloma)

---

Top Contributors

[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (33 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (32 commits)")[![jeromecoloma](https://avatars.githubusercontent.com/u/122153?v=4)](https://github.com/jeromecoloma "jeromecoloma (25 commits)")

---

Tags

laravelloggingerror-reportinglaravel 12notificationsslackerror-monitoringexception handlererrlyfree-alternativebugsnag-alternative

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/errly-laravel-errly/health.svg)

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

###  Alternatives

[spatie/laravel-health

Monitor the health of a Laravel application

86910.0M83](/packages/spatie-laravel-health)[spatie/laravel-slack-alerts

Send a message to Slack

3212.6M4](/packages/spatie-laravel-slack-alerts)[shaffe/laravel-mail-log-channel

A package to support logging via email in Laravel

1286.2k](/packages/shaffe-laravel-mail-log-channel)[jacobtims/filament-logger

Activity logger for filament

1721.0k4](/packages/jacobtims-filament-logger)

PHPackages © 2026

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