Download the PHP package irabbi360/laravel-log-notifier without Composer
On this page you can find all versions of the php package irabbi360/laravel-log-notifier. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download irabbi360/laravel-log-notifier
More information about irabbi360/laravel-log-notifier
Files in irabbi360/laravel-log-notifier
Package laravel-log-notifier
Short Description This is my package laravel-log-notifier
License MIT
Homepage https://github.com/irabbi360/laravel-log-notifier
Informations about the package laravel-log-notifier
Laravel Log Notifier
Real-time Laravel error monitoring with Toast Notifications
Laravel Log Notifier is a developer-friendly Laravel package that captures application exceptions and sends real-time in-app toast notifications instantly.
It helps you stay informed about errors as they happen, without constantly checking logs or using expensive third-party services like Sentry or Bugsnag.
Key Features
- Real-time Exception Capture - Instantly detects and captures exceptions
- Toast Notifications - In-app alerts appear immediately in top-right corner
- Global Display - Works across your entire application, no permissions needed
- Interactive Modal - Click notifications to view full error details
- Smart Pause - Hover over notifications to pause auto-close timer
- Sound Alerts - Optional beep for critical errors
- Professional UI - Styled like Laravel's native error page
- Error Details - Shows message, file, line number, and full stack trace
- Lightweight - No database required, uses simple JSON storage
- Secure - Built with Laravel auth in mind
- Zero Setup - Works out of the box, no complex configuration
- Production Ready - Efficient and reliable error handling
Installation
Install via Composer:
Publish the config file:
Configuration
Configure your settings in config/log-notifier.php:
Quick Start
Step 1: Register Exception Handler
In your bootstrap/app.php, add the Log Notifier exception handler:
Step 2: Add Notification Component
Add the notification component to your main layout (e.g., resources/views/layouts/app.blade.php):
Step 3: Enable in Environment
Make sure the package is enabled (default is true):
Done! All exceptions will now trigger real-time toast notifications. 🎉
📖 Usage
Automatic Error Capture
The package automatically captures all exceptions in your Laravel application. No manual setup required:
Enable/Disable Notifications
Control the package via configuration:
Or via environment variable:
Filter Error Levels
Control which error levels trigger notifications:
Display Notifications in Your App
Add this single line to your main layout file (e.g., resources/views/layouts/app.blade.php):
That's it! Errors will now show as toast notifications across your entire application.
Toast Notifications
Toast notifications appear automatically when exceptions occur in your application:
Features
- Real-time - Instant notification delivery via Server-Sent Events (SSE)
- Always Visible - Fixed position in top-right corner
- Color-Coded - Visual indication by error level (red for error, orange for warning, etc.)
- Hover to Pause - Auto-close timer pauses when hovering over the notification
- Click for Details - Open modal with full error information
- Sound Alerts - Optional beep for critical/alert level errors
- Professional Styling - Matches Laravel's native error page design
User Interactions
- Hover → Pause the auto-close countdown timer
- Move Away → Resume the countdown
- Click Toast → Open modal with detailed error information
- Click Close Button (×) → Dismiss notification immediately
- Press ESC Key → Close the error details modal
- Click Outside Modal → Close the error details modal
How It Works
The package uses Server-Sent Events (SSE) for real-time error delivery:
Real-Time Delivery
- Exceptions are captured instantly and streamed to the browser via SSE
- No polling or page reloads required
- Browser maintains persistent connection for instant notifications
- Automatic reconnection if connection drops
Security
- Built with Laravel Auth - Works with your existing auth system
- No External Services - Everything runs on your server
- No Sensitive Data Logging - Exceptions are not persisted beyond current session
Testing
Troubleshooting
Toast Notifications Not Appearing?
Check 1: Verify package is enabled
Check 2: Ensure notification view is included in layout
Check 3: Check browser console for errors Open DevTools (F12) and look for JavaScript errors.
Check 4: Verify error levels match configuration
No Sound on Critical Errors?
Make sure sound is enabled in config:
Note: Browsers may require user interaction before playing audio.
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
- Fazle Rabbi
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
All versions of laravel-log-notifier with dependencies
spatie/laravel-package-tools Version ^1.16
illuminate/contracts Version ^10.0 | ^11.0 | ^12.0