PHPackages                             kseven/laravel-pwa - 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. kseven/laravel-pwa

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

kseven/laravel-pwa
==================

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

v1.0-beta(1y ago)033MITPHPPHP &gt;=8.0.0

Since Nov 11Pushed 1y ago1 watchersCompare

[ Source](https://github.com/ksevendev/laravel-pwa)[ Packagist](https://packagist.org/packages/kseven/laravel-pwa)[ RSS](/packages/kseven-laravel-pwa/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (3)Versions (2)Used By (0)

PWA Easy Setup for Laravel
==========================

[](#pwa-easy-setup-for-laravel)

 [![Screenshot 2024-10-04 at 10 34 23 PM](https://private-user-images.githubusercontent.com/72160684/373738299-2b187de0-d5cc-4871-9c5d-ce0ffbb5a26c.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NzU1OTYwOTYsIm5iZiI6MTc3NTU5NTc5NiwicGF0aCI6Ii83MjE2MDY4NC8zNzM3MzgyOTktMmIxODdkZTAtZDVjYy00ODcxLTljNWQtY2UwZmZiYjVhMjZjLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNjA0MDclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjYwNDA3VDIxMDMxNlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTQ0MWIwNGJiMmZlZDc4NGViOWE3NmZhYjU1OWY1Mjg0NGQxODU0N2M0Njg5YjI0NGNiYTNhNzRmODdhMmQxMDMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.RNRe5A4F4SeXUi48FJj_UDfM6-Kw-29MB_IhVgGtFiE)](https://private-user-images.githubusercontent.com/72160684/373738299-2b187de0-d5cc-4871-9c5d-ce0ffbb5a26c.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NzU1OTYwOTYsIm5iZiI6MTc3NTU5NTc5NiwicGF0aCI6Ii83MjE2MDY4NC8zNzM3MzgyOTktMmIxODdkZTAtZDVjYy00ODcxLTljNWQtY2UwZmZiYjVhMjZjLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNjA0MDclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjYwNDA3VDIxMDMxNlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTQ0MWIwNGJiMmZlZDc4NGViOWE3NmZhYjU1OWY1Mjg0NGQxODU0N2M0Njg5YjI0NGNiYTNhNzRmODdhMmQxMDMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.RNRe5A4F4SeXUi48FJj_UDfM6-Kw-29MB_IhVgGtFiE)Laravel PWA is a package designed to seamlessly integrate Progressive Web Application (PWA) functionality into your Laravel projects. With this package, you can easily configure, update the manifest, and register service workers, enabling any Laravel app to function as a PWA.

Features 🚀
----------

[](#features-)

- Automatically generate PWA manifest and service worker
- Configurable installation button
- Supports Laravel 8, 9, 10, and 11
- Easy setup and usage
- Compatible with mobile and desktop devices

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

[](#important-️)

Note: PWAs require a secure HTTPS connection to work correctly. Ensure your application is hosted with HTTPS; otherwise, service workers and other PWA features will not function as expected.

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

[](#installation-)

To get started, install the package using Composer:

```
composer require kseven/laravel-pwa
```

Once installed, publish the PWA configuration files using:

```
php artisan ks:publish-laravel-pwa
```

This will create the required configuration file `config/pwa.php` and set up PWA functionality for your application.

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

[](#configuration-️)

### Main Configuration File: `config/pwa.php`

[](#main-configuration-file-configpwaphp)

This is your main configuration file where you can customize the PWA settings.

```
return [

    'debug' => env('APP_DEBUG', false),

    'vapid_public' => env('VAPID_PUBLIC_KEY', null),

    'install-button' => true, // Show or hide install button globally

    'manifest' => [
        'name' => 'KSeven PWA',
        'short_name' => 'KSPWA',
        'description' => 'A Progressive Web Application setup for Laravel projects.',
        "version" => "0.0.0",
        'background_color' => '#000',
        'theme_color' => '#F12',
        "start_url" => "/?source=pwa",
        "scope" => "/",
        "display" => "standalone",
        "display_override" => ["standalone", "fullscreen"],
        "orientation" => "portrait-primary",
        "lang" => "pt-BR",
        "dir" => "ltr",
        "icons" => [
            [
                "src" => "/assets/images/96x96.png",
                "sizes" => "96x96",
                "type" => "image/png"
            ],
            [
                "src" => "/assets/images/192x192.png",
                "sizes" => "192x192",
                "type" => "image/png"
            ],
            [
                "src" => "/assets/images/512x512.png",
                "sizes" => "512x512",
                "type" => "image/png"
            ]
        ],
        "screenshots" => [
            [
                "src" => "/assets/images/screanshot1.jpg",
                "sizes" => "576x1280",
                "type" => "image/jpeg"
            ],
            [
                "src" => "/assets/images/screanshot2.jpg",
                "sizes" => "576x1280",
                "type" => "image/jpeg"
            ],
            [
                "src" => "/assets/images/screenshot-wide.jpg",
                "sizes" => "1365x605",
                "type" => "image/jpeg",
                "form_factor" => "wide"
            ]
        ],
        "categories" => ["general"],
        "shortcuts" => [
            [
                "name" => "KSeven",
                "short_name" => "KSeven",
                "description" => "Seu desenvolvedor...",
                "url" => "/",
                "icons" => [
                    [
                        "src" => "/assets/images/96x96.png",
                        "sizes" => "96x96",
                        "type" => "image/png"
                    ]
                ]
            ]
        ],
        "related_applications" => [
            [
                "platform" => "webapp",
                "url" => "https://kseven.com.br/"
            ],
            [
                "platform" => "play",
                "id" => "com.kseven.app"
            ]
        ],
        "prefer_related_applications" => false,
        "iarc_rating_id" => "e10+"
    ],

];
```

### Customizing Manifest File

[](#customizing-manifest-file)

After changing `config/pwa.php` in your `manifest` array, run this command You can update your PWA manifest file by running:

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

This command updates the `manifest.json` file located in the public directory of your Laravel project.

Usage 🛠️
--------

[](#usage-️)

To integrate PWA functionality into your layouts, use the provided Blade directives.

### 1. **Add Meta Tags**

[](#1-add-meta-tags)

Place the `@PwaHead` directive inside the `` tag of your main layout file:

```

    @PwaHead
    Your App Title

```

### 2. **Register Service Worker**

[](#2-register-service-worker)

Just before the closing `` tag in your main layout file, add:

```
    @RegisterServiceWorkerScript

```

These directives will automatically generate the necessary tags and JavaScript for the PWA.

Screenshots 📸
-------------

[](#screenshots-)

[![Screenshot 2024-09-19 at 10 11 01 PM](https://private-user-images.githubusercontent.com/72160684/369091668-27c08862-0557-4fbd-bd8f-90b9d05f67b3.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NzU1OTYwOTYsIm5iZiI6MTc3NTU5NTc5NiwicGF0aCI6Ii83MjE2MDY4NC8zNjkwOTE2NjgtMjdjMDg4NjItMDU1Ny00ZmJkLWJkOGYtOTBiOWQwNWY2N2IzLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNjA0MDclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjYwNDA3VDIxMDMxNlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTdkOWY2ODMyMTA4Njg0NGQ1ZGYyNDU3MGM3MTVhNjE0YzJhOGM1N2JiZTM1NWM1MTQzYTUzMDkxOWY0MTk1YmQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.ovLpRTjIdk6HSEYKPIvwj4pB4B99bozL_9o4ycYYgAI)](https://private-user-images.githubusercontent.com/72160684/369091668-27c08862-0557-4fbd-bd8f-90b9d05f67b3.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NzU1OTYwOTYsIm5iZiI6MTc3NTU5NTc5NiwicGF0aCI6Ii83MjE2MDY4NC8zNjkwOTE2NjgtMjdjMDg4NjItMDU1Ny00ZmJkLWJkOGYtOTBiOWQwNWY2N2IzLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNjA0MDclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjYwNDA3VDIxMDMxNlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTdkOWY2ODMyMTA4Njg0NGQ1ZGYyNDU3MGM3MTVhNjE0YzJhOGM1N2JiZTM1NWM1MTQzYTUzMDkxOWY0MTk1YmQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.ovLpRTjIdk6HSEYKPIvwj4pB4B99bozL_9o4ycYYgAI)### Installing PWA App

[](#installing-pwa-app)

[![Screenshot 2024-09-19 at 10 13 23 PM](https://private-user-images.githubusercontent.com/72160684/369092461-5e58a596-3267-42d9-98d5-c48b0f54d3ed.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NzU1OTYwOTYsIm5iZiI6MTc3NTU5NTc5NiwicGF0aCI6Ii83MjE2MDY4NC8zNjkwOTI0NjEtNWU1OGE1OTYtMzI2Ny00MmQ5LTk4ZDUtYzQ4YjBmNTRkM2VkLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNjA0MDclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjYwNDA3VDIxMDMxNlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTJkNzRjZTgyY2Q4NjQ3NTk5NGY2NjllMDU4OTNlY2Q4NmE0Zjk3MTBmODcyZDZkNDFhM2MzNzgyZTE3MGNkNDImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.4H5wpY6Fem3buranYrJM3G8mKc1dvQ3ShpIyL3xt4nU)](https://private-user-images.githubusercontent.com/72160684/369092461-5e58a596-3267-42d9-98d5-c48b0f54d3ed.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NzU1OTYwOTYsIm5iZiI6MTc3NTU5NTc5NiwicGF0aCI6Ii83MjE2MDY4NC8zNjkwOTI0NjEtNWU1OGE1OTYtMzI2Ny00MmQ5LTk4ZDUtYzQ4YjBmNTRkM2VkLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNjA0MDclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjYwNDA3VDIxMDMxNlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTJkNzRjZTgyY2Q4NjQ3NTk5NGY2NjllMDU4OTNlY2Q4NmE0Zjk3MTBmODcyZDZkNDFhM2MzNzgyZTE3MGNkNDImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.4H5wpY6Fem3buranYrJM3G8mKc1dvQ3ShpIyL3xt4nU)### Offline Page

[](#offline-page)

[![Screenshot 2024-09-19 at 10 13 52 PM](https://private-user-images.githubusercontent.com/72160684/369092542-1a80465e-0307-43ac-a1bc-9bca2cf16f8d.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NzU1OTYwOTYsIm5iZiI6MTc3NTU5NTc5NiwicGF0aCI6Ii83MjE2MDY4NC8zNjkwOTI1NDItMWE4MDQ2NWUtMDMwNy00M2FjLWExYmMtOWJjYTJjZjE2ZjhkLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNjA0MDclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjYwNDA3VDIxMDMxNlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTdmYmE5ODk2NmU3NTMwZjIyYzhhOWViNjlhNWM1YWI4YjE1OGIxZmRjODI4ZTRhN2Q0ZWYyZGZhNDc5OTUzMzgmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.4RdTjVMGJYyHojV9RDZf_m0a54ILV-Bv8VVK4jkXkOc)](https://private-user-images.githubusercontent.com/72160684/369092542-1a80465e-0307-43ac-a1bc-9bca2cf16f8d.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NzU1OTYwOTYsIm5iZiI6MTc3NTU5NTc5NiwicGF0aCI6Ii83MjE2MDY4NC8zNjkwOTI1NDItMWE4MDQ2NWUtMDMwNy00M2FjLWExYmMtOWJjYTJjZjE2ZjhkLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNjA0MDclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjYwNDA3VDIxMDMxNlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTdmYmE5ODk2NmU3NTMwZjIyYzhhOWViNjlhNWM1YWI4YjE1OGIxZmRjODI4ZTRhN2Q0ZWYyZGZhNDc5OTUzMzgmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.4RdTjVMGJYyHojV9RDZf_m0a54ILV-Bv8VVK4jkXkOc)Contribution 🧑‍💻
----------------

[](#contribution-‍)

We appreciate your interest in contributing to this Laravel PWA project! Whether you're reporting issues, fixing bugs, or adding new features, your help is greatly appreciated.

### Forking and Cloning the Repository

[](#forking-and-cloning-the-repository)

1. Go to the repository page on GitHub.
2. Click the **Fork** button at the top-right corner of the repository page.
3. Clone your forked repository:

    ```
    git clone https://github.com/your-username/laravel-pwa.git
    ```

### Reporting Issues

[](#reporting-issues)

If you encounter any issues, please check if the issue already exists in the **Issues** section. If not, create a new issue with the following details:

- Steps to reproduce the issue
- Expected and actual behavior
- Laravel version
- Any relevant logs or screenshots

### Submit a Pull Request

[](#submit-a-pull-request)

When you're ready to contribute, open a pull request describing the changes you’ve made and how they improve the project. Please ensure:

- All commits are squashed into one clean commit.
- The code follows **PSR-12** standards.
- You’ve tested the changes locally.

### Coding Standards

[](#coding-standards)

- Follow the [PSR-12](https://www.php-fig.org/psr/psr-12/) PHP coding standards.
- Keep your commit history clean and meaningful.
- Add comments where needed but avoid over-commenting.

Example Workflow 🌟
------------------

[](#example-workflow-)

Here’s a simple example of how to use this package:

1. Install the package via Composer.
2. Publish the configuration files.
3. Add the `@PwaHead` directive in your layout file’s ``.
4. Add the `@RegisterServiceWorkerScript` directive before the closing `` tag.
5. Customize the `config/pwa.php` to fit your project’s needs.
6. Run `php artisan ks:pwa-update-manifest` to update the manifest file.
7. That's it! Your Laravel app is now PWA-enabled. 🚀

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance38

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity29

Early-stage or recently created project

 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

Unknown

Total

1

Last Release

547d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/370be5a4a8a82b20f3c9a77adc97316236c3473f87419f3595b5080bf5252bf0?d=identicon)[kseven](/maintainers/kseven)

---

Top Contributors

[![ksevendev](https://avatars.githubusercontent.com/u/32661918?v=4)](https://github.com/ksevendev "ksevendev (9 commits)")

---

Tags

laravellaravel-packageofflinepwamanifestservice workerProgressive Web Applaravel pwa

### Embed Badge

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

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

###  Alternatives

[erag/laravel-pwa

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

16083.3k](/packages/erag-laravel-pwa)[barryvdh/laravel-ide-helper

Laravel IDE Helper, generates correct PHPDocs for all Facade classes, to improve auto-completion.

14.9k123.0M687](/packages/barryvdh-laravel-ide-helper)[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.

571.4k](/packages/devrabiul-laravel-pwa-kit)[codexshaper/laravel-pwa

Laravel Progressive Web App

153.0k](/packages/codexshaper-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)[bjuppa/laravel-blog

Add blog functionality to your Laravel project

483.3k2](/packages/bjuppa-laravel-blog)

PHPackages © 2026

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