- How do I install emuniq/filament-browser-notifications in a Laravel Filament app?
- Run composer require emuniq/filament-browser-notifications and then php artisan browser-notifications:install. The install command generates VAPID keys in your .env, publishes and runs the push_subscriptions migration, and adds the HasPushSubscriptions trait to your User model. No manual Filament plugin registration or service worker publishing is required because the package auto-registers on all panels and serves the service worker from a route.
- Do I need to change my existing Filament notification code to get browser push?
- No. The package hooks into the DatabaseNotification::created event, so existing Notification::make()->sendToDatabase($users) calls and notifications using the database channel trigger a Web Push automatically. Your application code stays unchanged as long as it already writes database notifications.
- Do browser push notifications arrive when the browser tab is closed?
- Yes, this is server-driven Web Push using VAPID, not a client-side Notification API toast. Once a user subscribes, pushes are delivered through the browser push service even if the Filament tab is closed, subject to browser and operating system notification settings. The package only fires for users who have an active push subscription.
- Which Laravel, PHP, and Filament versions does this package support?
- The package targets Filament admin panels, and its technical assessment lists Filament 3.x or 4.x, Laravel 10–11+, and PHP 8.2+ as realistic prerequisites. Because Filament notification internals are not a stable public API, verify the exact constraints in the package composer.json before committing. Filament 4 has shipped, so confirm the package is built against the major version you run.
- How does the package generate VAPID keys, and where are they stored?
- The browser-notifications:install command generates VAPID keys and adds them to your .env file. VAPID keys identify your application to browser push services and are required for Web Push subscriptions. Back them up and keep them out of version control, especially if you rotate or share environments.
- Do I need a queue worker and HTTPS for browser push notifications to work?
- Yes for a real pilot: Web Push delivery should run through a queue worker so notification sends do not block requests. Service workers only register over HTTPS, with localhost as the exception, so test on HTTPS or localhost. Plan for both before testing push in staging or production.
- Will every sendToDatabase() call trigger a push, including bulk notifications?
- Yes, the package is designed so every database notification becomes a Web Push. That is convenient for normal notifications, but bulk imports, mass actions, and scheduled jobs can emit hundreds of pushes. The technical assessment recommends defining a rate-limit or batching approach before a production pilot.
- Can I disable the subscription prompt or profile section on some Filament panels?
- The package auto-injects the subscription prompt and profile section on all Filament panels, and the README does not document a per-panel opt-out. The prompt delay is described as configurable, so check the package config after installation for available options. Verify in the source whether prompt and profile injection can be disabled before relying on it.
- What happens during install if my User model is read-only in Docker?
- The install command needs write access to app/Models/User.php to add the HasPushSubscriptions trait. If PHP cannot write the model, the command skips that step and prints instructions instead of failing. You can add the trait manually with use NotificationChannels\WebPush\HasPushSubscriptions; in your User class.
- Is emuniq/filament-browser-notifications production-ready, and what alternatives exist?
- Treat it as early-stage: the assessment flags a single maintainer, low star count, and no known production dependents, so you may be the first serious adopter. The underlying approach is standard Laravel Web Push via VAPID, and alternatives include wiring laravel-notification-channels/webpush manually alongside Filament database notifications. Pilot behind a feature flag and be ready to debug Filament version coupling yourself.