PHPackages                             devrabiul/laravel-pwa-kit - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. devrabiul/laravel-pwa-kit

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

devrabiul/laravel-pwa-kit
=========================

Laravel PWA Kit is a lightweight and flexible package to add Progressive Web App (PWA) support to your Laravel applications with ease.

v1.1(8mo ago)571.4k↓33.3%7MITPHPPHP &gt;=8.0

Since Aug 27Pushed 7mo ago1 watchersCompare

[ Source](https://github.com/devrabiul/laravel-pwa-kit)[ Packagist](https://packagist.org/packages/devrabiul/laravel-pwa-kit)[ Docs](https://github.com/devrabiul/laravel-pwa-kit)[ GitHub Sponsors](https://github.com/devrabiul)[ Fund](https://ko-fi.com/devrabiul)[ RSS](/packages/devrabiul-laravel-pwa-kit/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)DependenciesVersions (3)Used By (0)

Laravel PWA Kit – Laravel to PWA in Minutes
===========================================

[](#laravel-pwa-kit--laravel-to-pwa-in-minutes)

**Laravel PWA Kit** is a powerful, easy-to-use Laravel package that transforms your web applications into **Progressive Web Apps (PWAs)**. With this package, your Laravel apps can be **installable, offline-ready, fast, and engaging**, without writing complex service worker logic manually.

[![Latest Stable Version](https://camo.githubusercontent.com/e755c3cc40880ceeda6e16351ea9b3c1f30e5deac72f4af7243da38936c0166e/68747470733a2f2f706f7365722e707567782e6f72672f64657672616269756c2f6c61726176656c2d7077612d6b69742f762f737461626c65)](https://packagist.org/packages/devrabiul/laravel-pwa-kit)[![Total Downloads](https://camo.githubusercontent.com/d700e7930857f3a4c62d1bb71f804f2c4d91dc5fe034e67cb8470693eab57c9f/68747470733a2f2f706f7365722e707567782e6f72672f64657672616269756c2f6c61726176656c2d7077612d6b69742f646f776e6c6f616473)](https://packagist.org/packages/devrabiul/laravel-pwa-kit)[![Monthly Downloads](https://camo.githubusercontent.com/67a2b4406e7c26f748e32740b546217dfaf622fbb76a916b4de9b27b00993b1c/68747470733a2f2f706f7365722e707567782e6f72672f64657672616269756c2f6c61726176656c2d7077612d6b69742f642f6d6f6e74686c79)](https://packagist.org/packages/devrabiul/laravel-pwa-kit)[![GitHub license](https://camo.githubusercontent.com/054cf0428527b64492a3bfb24672039e3a959a4c34f956fc968b47f69825a790/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f64657672616269756c2f6c61726176656c2d7077612d6b6974)](https://camo.githubusercontent.com/054cf0428527b64492a3bfb24672039e3a959a4c34f956fc968b47f69825a790/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f64657672616269756c2f6c61726176656c2d7077612d6b6974)[![Buy us a tree](https://camo.githubusercontent.com/130148911f548b001b2ac68a32c0a06559977ca60ada3bf480c72ae4ea093175/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f54726565776172652d2546302539462538432542332d6c69676874677265656e)](https://plant.treeware.earth/devrabiul/laravel-pwa-kit)[![GitHub Repo stars](https://camo.githubusercontent.com/45acd5dea538a159873145602c605b8dcb4aaffa419b01cd46fe390b0898a9fb/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f64657672616269756c2f6c61726176656c2d7077612d6b69743f7374796c653d736f6369616c)](https://camo.githubusercontent.com/45acd5dea538a159873145602c605b8dcb4aaffa419b01cd46fe390b0898a9fb/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f64657672616269756c2f6c61726176656c2d7077612d6b69743f7374796c653d736f6369616c)

---

✨ Features
----------

[](#-features)

- ⚙️ **Automatic Manifest &amp; Service Worker Generation** – No manual setup needed.
- 📲 **Add-to-Home-Screen Install Prompt** – Fully configurable toast notification.
- 🖥️📱 **Responsive &amp; Cross-Platform** – Works on mobile, tablet, and desktop.
- 🔄 **Laravel 8.x → 12.x Compatible** – Supports latest Laravel versions.
- 🛠️ **Customizable** – Modify icons, theme colors, app name, shortcuts via config.
- ⚡ **Offline Ready** – Supports offline pages and caching strategies.
- 🔐 **HTTPS Ready** – Fully compatible with HTTPS-secured applications.
- 🧩 **Livewire &amp; SPA Friendly** – Works out-of-the-box with Livewire v3, Vue 3, and React.
- 🌱 **Treeware Package** – Support environmental initiatives by contributing to tree planting.

---

🚀 Live Demo
-----------

[](#-live-demo)

👉 [Try the Live Demo](https://packages.rixetbd.com/devrabiul/laravel-pwa-kit)

[![Live Demo Thumbnail](https://camo.githubusercontent.com/869cc3d28df1729b7fb3c1a9bce8d69a48cb3f7e64297fd4f494bf9fb362fa06/68747470733a2f2f7061636b616765732e726978657462642e636f6d2f73746f726167652f6170702f7075626c69632f7061636b6167652f64657672616269756c2f6c61726176656c2d7077612d6b69742e77656270)](https://camo.githubusercontent.com/869cc3d28df1729b7fb3c1a9bce8d69a48cb3f7e64297fd4f494bf9fb362fa06/68747470733a2f2f7061636b616765732e726978657462642e636f6d2f73746f726167652f6170702f7075626c69632f7061636b6167652f64657672616269756c2f6c61726176656c2d7077612d6b69742e77656270)

---

🖼️ Screenshots / Demo
---------------------

[](#️-screenshots--demo)

See **Laravel PWA Kit** in action:

[![install-toast.png](https://camo.githubusercontent.com/2dd9e88991e13230c8046a4bd0b2d7152e26fa656ed839a4fcaaa67484b64848/68747470733a2f2f692e706f7374696d672e63632f58766d4c66706a4a2f696e7374616c6c2d746f6173742e706e67)](https://postimg.cc/VS9X1sbQ)[![offline-page.png](https://camo.githubusercontent.com/b06b513c2527b1c6ba71b8fb90665ba0ba899a27023722c3dcb6417392a57bf7/68747470733a2f2f692e706f7374696d672e63632f7a42686a3038766b2f6f66666c696e652d706167652e706e67)](https://postimg.cc/KkZBYXnK)[![installed-pwa.png](https://camo.githubusercontent.com/35a9622ab0a30d49733eab98051124a211d8fcc7c951047c5f08cb06081cac5f/68747470733a2f2f692e706f7374696d672e63632f765464764b6b36772f696e7374616c6c65642d7077612e706e67)](https://postimg.cc/dk4dkWB5)

**Descriptions:**

- **Install Toast Prompt** – The prompt displayed when users can add your app to the home screen.
- **Offline Page** – Shown when the user is offline.
- **Installed PWA** – Your Laravel app running as an installable Progressive Web App.

> **Live Demo:**

---

⚠️ Important
------------

[](#️-important)

PWAs require **HTTPS** to work correctly. Make sure your application is hosted with HTTPS; otherwise, service workers and other PWA features will not function properly.

> **Note:** For local development, you **can** use `php artisan serve`. Browsers allow service workers on `localhost` over HTTP, so you can test your PWA without HTTPS during development.

---

📦 Installation
--------------

[](#-installation)

Install via Composer:

```
composer require devrabiul/laravel-pwa-kit
```

Publish configuration and assets:

```
php artisan vendor:publish --provider="Devrabiul\PwaKit\PwaKitServiceProvider"
```

This publishes:

- `config/laravel-pwa-kit.php`
- `manifest.json`, `sw.js`, `offline.html`, and `logo.png` to both **public** and **base** directories.

---

⚙️ Configuration
----------------

[](#️-configuration)

Edit `config/laravel-pwa-kit.php` to customize your PWA:

```
return [
    'enable_pwa' => true,
    'install-toast-show' => true,
    'manifest' => [
        'name' => env('APP_NAME', 'Laravel'),
        'short_name' => 'LPT',
        'start_url' => '/',
        'theme_color' => '#FF5733',
        'background_color' => '#ffffff',
        'display' => 'standalone',
        'icons' => [
            [
                'src' => 'logo.png',
                'sizes' => '512x512',
                'type' => 'image/png',
            ]
        ],
    ],
    'livewire-app' => false,
];
```

---

🖥️ Usage
--------

[](#️-usage)

### Include Assets in Blade

[](#include-assets-in-blade)

**In ``:**

```
{!! PwaKit::head() !!}
```

**Before ``:**

```
{!! PwaKit::scripts() !!}
```

**Example Layout:**

```

    My PWA App

    {!! PwaKit::head() !!}

    Welcome to My PWA App

    {!! PwaKit::scripts() !!}

```

---

📲 Multiple Forced Install Buttons
---------------------------------

[](#-multiple-forced-install-buttons)

You can add multiple buttons anywhere in your app to **force the PWA install prompt**. Use the `.force-install-pwa-app` class on any button and attach the install trigger:

```

Install App
Add to Home Screen
```

```
// Trigger install prompt for multiple buttons
document.querySelectorAll(".force-install-pwa-app").forEach((btn) => {
    btn.onclick = triggerPWAInstall;
});
```

> 💡 **Tip:** `triggerPWAInstall` is the helper function provided by Laravel PWA Kit that opens the browser’s add-to-home-screen prompt. You can place as many buttons as you want in your UI.

---

### Livewire Support

[](#livewire-support)

Enable in `config/laravel-pwa-kit.php`:

```
'livewire-app' => true,
```

This ensures your service worker and toast behave correctly in **Livewire SPA apps**.

---

🛠️ Major Methods &amp; Usage
----------------------------

[](#️-major-methods--usage)

MethodDescriptionExample`PwaKit::head()`Generates ``, `` and stylesheet tags for PWA.`{!! PwaKit::head() !!}``PwaKit::scripts()`Registers service worker, scripts, and install toast HTML.`{!! PwaKit::scripts() !!}``PwaKit::updatePWALogo(Request $request)`Handles logo upload, validates, and stores in public &amp; base paths.`$result = PwaKit::updatePWALogo($request);``createOrUpdate(array $manifest, bool $force = false)`Programmatically create or update `manifest.json`.`$pwa = new PwaKit(); $pwa->createOrUpdate($manifest);``update(array $manifestData)`Updates manifest data safely.`$pwa = new PwaKit(); $pwa->update($manifestData);`---

🛠️ Major Methods Usage Examples
-------------------------------

[](#️-major-methods-usage-examples)

### 1. `PwaKit::head()`

[](#1-pwakithead)

Generates all ``, `` and stylesheet tags required for your PWA.

```
{{-- In the  section of your Blade template --}}
{!! PwaKit::head() !!}
```

---

### 2. `PwaKit::scripts()`

[](#2-pwakitscripts)

Registers the service worker, required scripts, and displays the install toast.

```
{{-- Before closing  tag --}}
{!! PwaKit::scripts() !!}
```

---

### 3. `PwaKit::updatePWALogo(Request $request)`

[](#3-pwakitupdatepwalogorequest-request)

Handles **logo upload**, validates **file type** (PNG), enforces **minimum dimensions** (512×512), and stores the logo in both the **public** and **base** directories.

- The uploaded file must be sent with the key **`logo`** (`$request['logo']`).

```
use Illuminate\Http\Request;
use Devrabiul\PwaKit\Facades\PwaKit;

public function updateLogo(Request $request)
{
    // $request['logo'] contains the uploaded file
    $result = PwaKit::updatePWALogo($request);

    if ($result['status']) {
        return back()->with('success', $result['message']);
    } else {
        return back()->withErrors($result['errors'] ?? $result['error']);
    }
}
```

---

### 4. `createOrUpdate(array $manifest, bool $force = false)`

[](#4-createorupdatearray-manifest-bool-force--false)

Programmatically creates or updates the `manifest.json` file.

```
use Devrabiul\PwaKit\Facades\PwaKit;

$manifest = [
    'appName' => env('APP_NAME', 'Laravel'),
    'name' => env('APP_NAME', 'Laravel'),
    'shortName' => env('APP_NAME', 'Laravel'),
    'short_name' => env('APP_NAME', 'Laravel'),
    'startUrl' => '/',
    'start_url' => '/',
    'scope' => '/',
    'author' => 'Rabiul Islam',
    'version' => '1.0',
    'description' => 'A description of your web app.',
    'orientation' => 'portrait',
    'dir' => 'auto',
    'lang' => 'en',
    'display' => 'standalone',
    'themeColor' => '#FF5733',
    'theme_color' => '#FF5733',
    'backgroundColor' => '#ffffff',
    'background_color' => '#FF5733',
    'icons' => [
        [
            'src' => 'logo.png',
            'sizes' => '512x512',
            'type' => 'image/png',
        ]
    ],
];

PwaKit::createOrUpdate($manifest, true); // true = force overwrite
```

---

💡 Benefits
----------

[](#-benefits)

- ✅ Turn your Laravel web app into an **installable PWA** instantly.
- ✅ Provides **offline support**, caching, and fast load times.
- ✅ Reduces repetitive boilerplate code for **service workers &amp; manifest**.
- ✅ Fully **customizable** via configuration.
- ✅ Works seamlessly with **Blade, Livewire, Vue 3, and React**.
- ✅ Encourages modern web best practices.

---

🔧 Commands
----------

[](#-commands)

- **Update Manifest:**

```
php artisan pwa:update-manifest
```

---

⚠️ Requirements
---------------

[](#️-requirements)

- Laravel 8.x to 12.x
- PHP 8.0+
- HTTPS (PWAs require secure contexts for service workers)
- Optional: Livewire v3 for SPA support

---

🌱 Treeware
----------

[](#-treeware)

This package is [Treeware](https://treeware.earth). If you use it in production, then we ask that you [**buy the world a tree**](https://plant.treeware.earth/devrabiul/laravel-pwa-kit) to thank us for our work. By contributing to the Treeware forest you’ll be creating employment for local families and restoring wildlife habitats.

---

🤝 Contributing
--------------

[](#-contributing)

1. Fork the repository.
2. Make your changes.
3. Submit a pull request.

Feature requests and bugs? [Open an issue](https://github.com/devrabiul/laravel-pwa-kit/issues).

---

📄 License
---------

[](#-license)

MIT License – see [LICENSE](LICENSE) file.

---

📬 Contact
---------

[](#-contact)

For support: 📧 Email: 🌐 GitHub: [devrabiul/laravel-pwa-kit](https://github.com/devrabiul/laravel-pwa-kit)

###  Health Score

40

—

FairBetter than 88% of packages

Maintenance62

Regular maintenance activity

Popularity33

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity42

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~15 days

Total

2

Last Release

243d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/9eaf28cb5d9d5d87660cbe335e7b82a08bc7801a40556c3a99740e22282d9e17?d=identicon)[devrabiul](/maintainers/devrabiul)

---

Top Contributors

[![devrabiul](https://avatars.githubusercontent.com/u/112581088?v=4)](https://github.com/devrabiul "devrabiul (10 commits)")

---

Tags

installable-applaravellaravel-packagemanifest-jsonprogressive-web-apppwaservice-workerlaravelofflinepwamanifestservice workerProgressive Web Applaravel pwaweb apppwa-kit

### Embed Badge

![Health badge](/badges/devrabiul-laravel-pwa-kit/health.svg)

```
[![Health](https://phpackages.com/badges/devrabiul-laravel-pwa-kit/health.svg)](https://phpackages.com/packages/devrabiul-laravel-pwa-kit)
```

###  Alternatives

[erag/laravel-pwa

A simple and easy-to-use PWA (Progressive Web App) package for Laravel applications.

16083.3k](/packages/erag-laravel-pwa)[silviolleite/laravelpwa

Looks like an app, feels like an app, but NOT an app.

1.1k1.2M2](/packages/silviolleite-laravelpwa)[ladumor/laravel-pwa

this package used for the make pwa website.

270277.7k](/packages/ladumor-laravel-pwa)[alareqi/filament-pwa

A comprehensive PWA (Progressive Web App) plugin for Filament v3 and v4 admin panels with offline functionality, installation prompts, and icon generation.

132.9k](/packages/alareqi-filament-pwa)[codexshaper/laravel-pwa

Laravel Progressive Web App

153.0k](/packages/codexshaper-laravel-pwa)[efficiently/larasset

Larasset is a library for Laravel 5 which manage assets in an easy way.

684.8k](/packages/efficiently-larasset)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
