- How do I install tomatophp/filament-pwa in a Laravel Filament app?
- Install it with composer require tomatophp/filament-pwa, then publish and migrate the Spatie Laravel Settings migrations and run php artisan filament-settings-hub:install. After that, run php artisan filament-pwa:install. Finally, register the plugin in your AdminPanelProvider with ->plugin(\TomatoPHP\FilamentPWA\FilamentPWAPlugin::make()).
- Do I need Spatie Laravel Settings to use Filament PWA?
- Yes, the package uses Spatie Laravel Settings to store PWA configuration such as manifest and service worker settings. You need to publish the settings migrations and run filament-settings-hub:install before running filament-pwa:install. The package then adds its own settings storage, including a filament_pwa_settings table, during installation.
- How do I register the Filament PWA plugin in AdminPanelProvider?
- Add ->plugin(\TomatoPHP\FilamentPWA\FilamentPWAPlugin::make()) to your Filament panel provider, typically in app/Providers/Filament/AdminPanelProvider.php. Once registered, PWA settings become available through Filament's Settings Hub. If you use multiple panels, confirm where you want the PWA enabled and test the registration order with other plugins.
- Can I enable the PWA on non-Filament pages in Laravel?
- Yes, the package provides a @filamentPWA Blade directive for pages outside the Filament panel. Add it just before the closing head tag in your Blade layout. This lets the same PWA manifest and service worker setup apply to non-Filament routes.
- Where do I configure PWA icons, theme colors, and splash screens?
- Configuration is managed from Filament's Settings Hub after you install and register the plugin. The package is settings-driven, so manifest details like icons and theme colors can be adjusted at runtime instead of hardcoded. You can also publish the config, views, and language files if you need deeper customization.
- Does filament-pwa add offline support and a service worker?
- The package leverages Workbox and service workers to provide PWA features such as installability and offline support. The service worker is registered through Filament's asset pipeline with minimal manual frontend work. Advanced features like background sync or periodic sync would require custom Workbox configuration beyond the package defaults.
- Will tomatophp/filament-pwa work with Vite or Laravel Mix?
- The package assumes Filament's default frontend build setup, so it should be tested with your Vite or Laravel Mix configuration. Custom webpack or asset pipelines may need validation because service worker registration and caching can conflict with existing asset handling. Run a staging build and verify hot reloading, cached assets, and offline behavior before production.
- How do I test the PWA install prompt and offline mode?
- Install and configure the package in staging, then open the app in a supported modern browser and check for the Add to Home Screen prompt. Use browser devtools to verify service worker registration, then switch offline and confirm cached pages still load. A Lighthouse audit can help validate PWA checks and performance impact.
- Which Filament and Laravel versions are supported by filament-pwa?
- The package is built as a FilamentPHP plugin and the evaluation notes Laravel 9+ compatibility with Filament v2+ recommended. Exact constraints should be checked in the package composer.json because Filament plugin APIs and frontend pipelines can change between major versions. Test the package against your specific Laravel and Filament versions before upgrading.
- Is tomatophp/filament-pwa production ready, and what alternatives exist?
- It can be production-ready if you validate service worker caching against Filament's asset pipeline and test offline behavior in staging. PWA registration can add initial load latency, and advanced features like background sync may require custom Workbox configuration. Alternatives include building your own Workbox setup or using a dedicated Laravel PWA package, but this package's advantage is panel-based settings inside Filament.