| Package Data | |
|---|---|
| Maintainer Username: | ladumor |
| Maintainer Contact: | shaileshmladumor@gmail.com (Shailesh Ladumor) |
| Package Create Date: | 2021-09-29 |
| Package Last Update: | 2025-08-05 |
| Home Page: | |
| Language: | PHP |
| License: | MIT |
| Last Refreshed: | 2025-11-04 15:10:30 |
| Package Statistics | |
|---|---|
| Total Downloads: | 229,940 |
| Monthly Downloads: | 7,822 |
| Daily Downloads: | 365 |
| Total Stars: | 257 |
| Total Watchers: | 6 |
| Total Forks: | 49 |
| Total Open Issues: | 1 |
Install the package by the following command,
composer require ladumor/laravel-pwa
Add the provider to your config/app.php into provider section if using lower version of laravel,
Ladumor\LaravelPwa\PWAServiceProvider::class,
Add the Facade to your config/app.php into aliases section,
'LaravelPwa' => \Ladumor\LaravelPwa\LaravelPwa::class,
Run the following command to publish config file,
php artisan laravel-pwa:publish
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>
The MIT License (MIT). Please see License File for more information