- How do I install ladumor/laravel-pwa in a Laravel application?
- Require the package with Composer, publish its config and assets with vendor:publish, adjust the manifest settings, then add the package's Blade directive to your base layout. The directive outputs the manifest link and the service-worker registration, so no Node build step or frontend rewrite is involved. A competent Laravel developer can complete the setup, including Lighthouse validation, in well under a day. The two real prerequisites are a secure context (HTTPS outside localhost) and correctly sized icon assets.
- Which Laravel and PHP versions does laravel-pwa support?
- The package is a framework-native presentation utility built on service providers, config publishing, route registration and Blade directives, which are the mechanisms used across Laravel 9 through 12. Because auto-discovery, config publishing and route registration have shifted between major versions, check the composer.json constraints and whether CI actually tests the version you run. Small single-author packages can lag a new Laravel major release by months, so confirm support before planning an upgrade.
- Does laravel-pwa work with a decoupled SPA or an API-only Laravel backend?
- It works in the narrow sense that it can still host a manifest, but most of the package becomes dead weight. The value is in inject the manifest link and service-worker registration into server-rendered Blade layouts; an API-only backend or a Vite/React/Vue shell already owns that layer. For a headless or API-first setup, ship the manifest and service worker from your frontend build instead.
- How do I add the manifest and service worker to my Blade layout?
- Add the package's Blade directive once in your base layout, typically inside the head section or just before the closing body tag. It renders the manifest link tag and the JavaScript that registers the service worker, so you do not hand-write either snippet. After that, verify in DevTools that the manifest parses, the service worker reaches the activated state, and the install prompt appears on a supported browser.
- What caching strategy does the generated service worker use?
- The package ships an opinionated caching strategy, and that is the part you must review line by line rather than accept by default. Cache-first handling of HTML or versioned assets is the classic cause of users seeing last week's deploy, especially for authenticated pages. Confirm the behavior per resource type (navigation, HTML, JS/CSS, images, API), check that caches are versioned and old ones purged on activate, and make sure you can override the strategy without forking the package.
- Will laravel-pwa conflict with my existing service worker, Vite asset hashing or a CDN?
- It can. Anything already serving /manifest.json or /sw.js, or a theme or starter kit that registers its own service worker, will collide at the route or scope level, so confirm the package's routes are namespaced and configurable. With Vite, reconcile the service worker's precache list against content-hashed filenames or you will cache stale bundles. If you use a CDN or a Content Security Policy, test that the worker script, manifest and offline fallback all load under those rules.
- Does laravel-pwa require HTTPS to work?
- Yes. Service workers only run in a secure context, so the package is fully functional in production behind HTTPS and on localhost during development. If you serve staging over plain HTTP on a non-localhost host, the worker will not register and installability checks will fail. Set up TLS on every environment where you intend to test the install prompt or offline behavior.
- Is ladumor/laravel-pwa actively maintained and safe to depend on in production?
- It is a small, single-author package with roughly 272 stars and zero dependents on Packagist, which is a weak adoption signal — assume you are an early adopter. The code volume is small, which caps the blast radius, but you should check issue activity, CI status and whether it is a fork of silviolleite/laravel-pwa so you understand the real upstream maintenance story. Pin the version and read the source before shipping it to authenticated users.
- Can I disable the service worker or purge its caches if a bad release ships?
- A service worker has broad scope over your origin, so a documented kill switch matters: a way to unregister the worker and clear caches for affected users. Confirm before launch whether the package exposes that, or plan to ship your own unregister-and-purge script at the same scope. Treat a misconfigured cache as a correctness and trust issue, not just a UX annoyance, because it can serve stale or wrong content to logged-in users.
- What does laravel-pwa include beyond the manifest and service worker?
- Per its documentation it provides a configurable manifest, the service worker, icon and splash-screen support, an offline fallback and an install prompt, all driven by publishable config. Push notifications are not part of the described feature set, so verify that in the source if you need them. Decide which of these extras you actually want before enabling them, since each one adds caching surface you will have to maintain.