spomky-labs/pwa-bundle
spomky-labs/pwa-bundle is a Symfony bundle that adds Progressive Web App capabilities to PHP applications, helping generate manifests, service workers, icons, and offline support with minimal configuration.
Framework reality check first. spomky-labs/pwa-bundle is a Symfony bundle, not a Laravel package. You cannot composer require it into a Laravel app and register a service provider — it depends on Symfony's DI container, config/bundles.php, tagged services, and the Symfony routing/config stack. In a Laravel codebase you have two viable paths:
vite-plugin-pwa / silviolleite/laravel-pwa.composer require spomky-labs/pwa-bundle, enable PwaBundle in config/bundles.php, then work entirely out of config/packages/pwa.yaml.Where to look first (Symfony install):
config/packages/pwa.yaml after bin/console config:dump-reference pwa — the manifest: block is the core; everything else is icons, favicons, and service worker wiring.bin/console list pwa — the bundle ships a generate command; run it in a deploy step, not per-request.bin/console debug:router | grep -i pwa.First use case: define name, short_name, start_url: /, display: standalone, theme_color, background_color, and point icons at one high-res source image; let the bundle generate the size matrix; add the <link rel="manifest"> tag to your layout head; verify under Chrome DevTools → Application → Manifest.
public/ as static assets. Deterministic output, cacheable by CDN, zero runtime cost.Cache::remember) rather than rebuilding on every hit.purpose: maskable icon for Android — omitting it is the most common cause of a "broken" installed icon.assets/, then ship it through Vite so it gets hashed and versioned.updateViaCache: 'none' or register a versioned URL (/sw.js?v=<build-hash>). Same for the manifest — a stale manifest is invisible until someone reinstalls.pwa.yaml. Pair this with a locale-aware manifest route if you ship multiple languages.vite-plugin-pwa covers service worker + Workbox caching; pair it with a Route::get('/manifest.webmanifest') returning a cached array from config/pwa.php. That gets you 90% of this bundle's value with no Symfony dependency.symfony/translation is absent, the bundle now falls back to the raw string instead of failing. Practical consequence — if your pwa.yaml uses translation keys (e.g. name: pwa.manifest.name) and the translator isn't installed, you will silently get "name": "pwa.manifest.name" in the output. No exception, no warning. If a manifest looks wrong after upgrading, check this first.^1.5 and, if you rely on translated manifest fields, diff the generated manifest.json before and after the bump./pwa/service-worker.js only controls /pwa/, not the site root. Serve it from / or set the Service-Worker-Allowed response header to the desired scope.apple-touch-icon link tags. Confirm the favicon/webkit generation actually emitted them.application/manifest+json. Chrome tolerates application/json; some tooling and validators don't.public/ get stale when the generate command is skipped on deploy. Either commit them or make generation a hard prerequisite of the build — don't leave it to a developer's memory.chrome://serviceworker-internals to force-unregister a wedged worker, and a Lighthouse PWA audit for installability. "Update on reload" in DevTools should be on during development.How can I help you explore Laravel packages today?