- π¨ 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 & open source - No subscription fees or limits
Note: Currently# π¨ Laravel Errly
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.
- π¨ 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 & open source - No subscription fees or limits
π’ Currently supports Slack notifications. Discord, Teams, and email support are planned for future releases.
Get Laravel Errly running in under 2 minutes:
composer require errly/laravel-errly
php artisan vendor:publish --tag=laravel-errly-config
# .env
ERRLY_SLACK_WEBHOOK_URL=https://hooks.slack.com/services/YOUR/WEBHOOK/URL
// 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();
php artisan errly:test
That's it! You'll receive a beautiful Slack notification with error details.
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]
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),
],
];
# 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"
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);
}
# 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
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',
],
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
Errors are automatically categorized:
- π΄ CRITICAL - Database errors, fatal errors, parse errors
- π‘ HIGH - HTTP 500+ errors
- π’ MEDIUM - General exceptions, runtime errors
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)
Automatically ignores noise:
- β 404 errors - Page not found
- β Validation errors - Form validation failures
- β Auth errors - Login failures
- β Rate limiting errors - Too many requests
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
- PHP 8.2+
- Laravel 12+
- Slack workspace with webhook URL (Discord, Teams, Email coming soon)
composer require errly/laravel-errly
php artisan vendor:publish --tag=laravel-errly-config
- Go to Slack API Apps
- Create new app β "From scratch"
- Enable "Incoming Webhooks"
- Add webhook to your desired channel
- Copy the webhook URL
ERRLY_ENABLED=true
ERRLY_SLACK_WEBHOOK_URL=https://hooks.slack.com/services/YOUR/WEBHOOK/URL
ERRLY_SLACK_CHANNEL=#errors
// 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();
php artisan errly:test
Check your Slack channel for the test notification!
We love contributions! Please see CONTRIBUTING.md for details.
git clone https://github.com/jeromecoloma/laravel-errly.git
cd laravel-errly
composer install
composer test
composer test # Run test suite
composer analyse # Static analysis
composer format # Code formatting
Please see CHANGELOG.md for recent changes.
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'));
Enable rate limiting:
ERRLY_RATE_LIMITING=true
ERRLY_MAX_PER_MINUTE=5
Use environment filtering:
ERRLY_FILTER_ENVIRONMENTS=true
ERRLY_ALLOWED_ENVIRONMENTS=production,staging
Laravel Errly is open-sourced software licensed under the MIT license.
- Jerome Coloma - Creator and maintainer
- Laravel Community - Inspiration and feedback
- Spatie - Package development tools
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 β’ π¦ View on Packagist β’ π Report Issues β’ π¬ Discussions