dd4you/pwa

This package used for the make pwa website quickly.

Installs: 9

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 1

Forks: 1

Open Issues: 0

pkg:composer/dd4you/pwa

v1.0.0 2022-12-25 02:32 UTC

This package is auto-updated.

Last update: 2025-09-25 08:33:35 UTC


README

Latest Stable Version Daily Downloads Monthly Downloads Total Downloads License PHP Version Require

Laravel PWA

Installation

Install the package by the following command,

 composer require dd4you/pwa

Publish the Assets

Run the following command to publish config file,

php artisan dd4you:install-pwa

Configure PWA

Add following code in root blade file in header section.

<!-- PWA  -->
<meta name="theme-color" content="#6777ef"/>
<link rel="apple-touch-icon" href="{{ asset('logo.PNG') }}">
<link rel="manifest" href="{{ asset('/manifest.json') }}">

Add following code in root blade file in before close the body.

<script src="{{ asset('/sw.js') }}"></script>
<script>
    if (!navigator.serviceWorker.controller) {
        navigator.serviceWorker.register("/sw.js").then(function (reg) {
            console.log("Service worker has been registered for scope: " + reg.scope);
        });
    }
</script>

License

The MIT License (MIT). Please see License File for more information