foxws/laravel-pwa
Laravel PWA adds progressive web app support to Laravel apps with manifest and service worker generation, install prompts, icons, and offline caching so users can install your site and use it like a native app.
composer require plus a pwa:generate command. Buy, unless you already own a service worker.beforeinstallprompt, so onboarding flows must never gate on an install prompt — an install-coaching UX decision, not just an engineering one.PWA_ENABLED=false plus pwa:generate writes a self-unregistering service worker that clears caches and removes itself. That gives us a genuine kill switch — a real de-risking factor for a client-side feature that is otherwise hard to roll back.pwa:generate, ignore_paths, cache-busting) so AI-assisted changes produce idiomatic output instead of ad-hoc Workbox. Nice-to-have; it should never gate the rollout and is inert for teams not using Boost.Adopt when:
?v= manifest/SW URLs from last-modified time, which handles the common stale-deploy case — but the cache-name-as-deployment-artifact discipline still needs a human.Look elsewhere or build when:
push handler, and a subscribe flow are on us, and misconfiguration fails silently.For executives: This is a small, reversible, low-cost bet that makes our Laravel web app installable on phones — home-screen icon, app-like launch, a graceful page instead of a browser error when connectivity drops. It reuses the stack we already have, requires no new infrastructure, no new vendor, and no native app team. We can turn it off with one config flag and a regenerate command, which pushes a self-removing service worker to clients. The honest sizing: it is a few days of engineering plus cross-device QA, and its risk is concentrated in one place — stale content after a deploy — which we mitigate with a versioning scheme the package already provides and a documented release step. Worth doing if installability is on the roadmap; not worth doing as a speculative "we should have a PWA."
For engineering: composer require, publish config, run pwa:generate, drop @pwaHead in <head> and @pwaSw before </body> in the root layout. Those are Blade includes, not components — no <x-pwa-head>. Don't hand-write manifest.json or sw.js; change config/pwa.php and regenerate on every deploy and config change. The service worker is network-first for pages and cache-first for assets, and already bypasses Inertia, Livewire, and htmx requests plus pwa.ignore_paths — keep that list current and make sure auth, CSRF, and any state-changing route bypass the cache. Set APP_URL and TrustProxies correctly or the manifest will reference icons on a different origin and installability fails with no useful error. route:cache and config:cache in the deploy script can freeze manifest/SW config, so clear both as part of release.
Sequencing we ask for: spike in a branch → deliberately test the deploy path (ship a trivial change, confirm clients pick it up without manual cache clear — this is the gate; if it fails, stop) → agree cache-invalidation ownership with the release owner → confirm manifest and icons resolve in the built Vite output, not just artisan serve → cross-device QA (Chromium desktop/Android, iOS Safari) plus one offline and one stale-deploy scenario → canary on a low-traffic route → widen. Adopt the Boost skill last; it's a documentation artifact.
What we owe support: a runbook before launch. Expect "the site is showing old content" and "the app won't update" tickets, which are near-impossible to diagnose ad hoc. Include how to identify a stale-SW client, force a refresh, and unregister remotely. Budget first-line enablement, not just engineering time.
How can I help you explore Laravel packages today?