fr3on / laravel-inbox
A local notification intercept dashboard for Laravel — caught and previewed in one place across all channels.
Requires
- php: ^8.2
- illuminate/database: ^10.0|^11.0|^12.0|^13.0
- illuminate/http: ^10.0|^11.0|^12.0|^13.0
- illuminate/notifications: ^10.0|^11.0|^12.0|^13.0
- illuminate/support: ^10.0|^11.0|^12.0|^13.0
Requires (Dev)
- laravel/pint: ^1.0
- orchestra/testbench: ^8.0|^9.0|^10.0
- pestphp/pest: ^2.34|^3.0
README
Laravel Inbox is a premium local notification intercept dashboard for Laravel. It allows you to catch, inspect, and simulate notifications across all major channels in a beautiful, real-time interface.
Features
- Multi-Channel Interception: Automatically catches notifications for Mail, Slack, SMS (Twilio/Vonage), Discord, Telegram, Push, WhatsApp, and Database.
- Premium Simulations: High-fidelity UI mockups for mobile devices and chat apps.
- Notifiable Inspector: Inspect the state of the Eloquent model associated with every notification.
- Timeline Tracking: Correlate notifications to see a sequence of events for specific targets.
- Resend Utility: Re-dispatch any captured notification with a single click.
- Advanced Filtering: Instant, real-time search and channel filtering.
- PWA Style UI: A fully responsive, mobile-optimized dashboard.
Installation
You can install the package via composer:
composer require fr3on/laravel-inbox --dev
The package will automatically register its service provider. To customize the installation, you can publish the config file:
php artisan vendor:publish --tag="inbox-config"
Configuration
By default, Laravel Inbox is only enabled when APP_DEBUG is true and APP_ENV is local.
// config/inbox.php return [ 'enabled' => env('INBOX_ENABLED', env('APP_ENV') === 'local'), 'path' => 'inbox', // The URL path for the dashboard 'middleware' => ['web'], // Add your own auth middleware here if needed 'gate' => null, // Optional Laravel Gate name for access control ];
Security
If you plan to use Laravel Inbox in a shared staging environment, we highly recommend protecting the route with a Gate:
// app/Providers/AuthServiceProvider.php Gate::define('view-inbox', function ($user) { return str_ends_with($user->email, '@yourcompany.com'); });
Then update your config: 'gate' => 'view-inbox'.
Testing
composer test
License
The MIT License (MIT). Please see License File for more information.