nyoncode/laravel-pwa
A static copy of a Laravel app with the package installed. Install it, go offline, and try the update toast.
Status
- Display mode
- …
- Service worker
- …
- Network
- …
Try it
- Install: the button in the header (Chrome, Edge), or Share → Add to Home Screen on iPhone and iPad.
- Offline: open Orders and About once, then turn on airplane mode (or DevTools → Network → Offline) and reload. Pages you opened come from the cache, others get the offline screen.
- Update: registers the worker again under a new URL, as a deploy would. The toast at the bottom asks before switching.
What a real app adds
GitHub Pages serves static files, so this demo has no server: no sign-in, no per-user caches, no CSRF keep-alive and no web push. A Laravel app allows page caching with the pwa.cache middleware; here a small sw.import script marks the demo pages as cacheable instead.