Foxws
PWA · Service Worker · Manifest
Laravel PWA

Turn your Laravel app into an installable, offline-friendly PWA.

Latest release
2.5.2
Requires
PHP ^8.3
Laravel
12.x / 13.x
Licence
MIT
$ composer require foxws/laravel-pwa
Get started Source ↗

Introduction

Laravel PWA turns your Laravel app into a Progressive Web App (PWA). It's small and opinionated, so there isn't much to set up.

It gives you:

  • Blade directives that add the PWA head tags and register the service worker.
  • An Artisan command that generates your manifest.json file and publishes a sw.js service worker.

The service worker keeps things fast without showing stale content:

  • Pages are always fetched from the network first, so users see the latest version.
  • Static assets, like images and scripts, are served from the cache first, so they load quickly.

It also skips the cache for requests from Inertia.js (X-Inertia), Livewire (X-Livewire, X-Livewire-Navigate), and htmx (HX-Request), so these frameworks never receive a stale, cached response.

Continue to Installation to get started.