Setup guide · Laravel
Turn a Laravel app into an installable PWA (2026)
Laravel 10+ PWA setup — manifest via public/, Blade-registered service worker and install prompt.
Key takeaways
- Everything under `public/` is served at the site root — perfect for `manifest.webmanifest` and `sw.js`.
- Register the service worker from `app.blade.php`.
- InstantPWA covers the iOS Safari install flow Laravel does not.
Before you start
- Laravel 9+
- HTTPS (Forge, Vapor, self-hosted with TLS)
- Two icon sizes
manifest.webmanifest
{
"name": "Your product",
"short_name": "Product",
"start_url": "/",
"display": "standalone",
"background_color": "#ffffff",
"theme_color": "#111827",
"icons": [
{ "src": "/icon-192.png", "sizes": "192x192", "type": "image/png" },
{ "src": "/icon-512.png", "sizes": "512x512", "type": "image/png", "purpose": "any maskable" }
]
}Step-by-step for Laravel
- Step 1Add PWA files to /public
Create `public/manifest.webmanifest` and `public/sw.js`.
- Step 2Link + register from app.blade.php
Add the tags inside `<head>`.
<link rel="manifest" href="/manifest.webmanifest"> <script>if ('serviceWorker' in navigator) navigator.serviceWorker.register('/sw.js');</script> - Step 3Drop in the install popup
Paste the InstantPWA snippet before `</head>`.
Minimal sw.js
// public/sw.js
self.addEventListener('install', (e) => self.skipWaiting());
self.addEventListener('activate', (e) => self.clients.claim());
self.addEventListener('fetch', () => {});Common Laravel gotchas
- Vapor serves via CloudFront — invalidate the manifest path after icon updates.
- If you use Livewire, avoid caching Livewire component responses in the SW.
FAQ
Do I need a native app if my Laravel site is a PWA?
No. Once your Laravel site meets the three PWA criteria (HTTPS, a manifest, a service worker), Chromium browsers offer to install it and iOS Safari 16.4+ supports the full standalone experience — including web push.
Will a service worker slow my Laravel site down?
Not measurably on first load. The worker installs asynchronously after the page becomes interactive. On repeat visits it typically improves LCP and TTFB because assets are served from cache.
Can I still deploy my Laravel site to Vercel, Netlify or Cloudflare?
Yes. Any static or edge host works — the manifest and service worker are plain files served from the origin. No build-time integration is required.
Skip the setup — drop in one line
InstantPWA handles the install prompt across iOS, Android and desktop. Free forever for one popup.
Get started free