Foxws

PWA · Service Worker · Manifest

Laravel PWA

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

composer require foxws/laravel-pwa
Get startedSource
Latest release
2.6.0
Requires
PHP ^8.3
Laravel
12.x / 13.x
Licence
MIT
Downloads
2.2K/mo

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.

Let your AI agent do the hard parts. This package ships a Laravel Boost skill, pwa-development, that teaches your agent how to install, configure and use Laravel PWA. Install Boost and select the skill when prompted:

composer require laravel/boost --dev
php artisan boost:install

Already using Boost? Run php artisan boost:update --discover to pick up the skill. Then just ask, for example: "Turn this app into an installable PWA with our logo as the app icon."

Continue to Installation to get started.