Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/shailesh-ladumor/laravel-pwa
Ladumor Laravel PWA makes laravel's website a progressive web application.
https://github.com/shailesh-ladumor/laravel-pwa
laravel laravel-pwa
Last synced: 7 days ago
JSON representation
Ladumor Laravel PWA makes laravel's website a progressive web application.
- Host: GitHub
- URL: https://github.com/shailesh-ladumor/laravel-pwa
- Owner: shailesh-ladumor
- License: mit
- Created: 2021-09-29T03:02:04.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2024-04-30T13:39:17.000Z (6 months ago)
- Last Synced: 2024-10-14T02:25:26.828Z (24 days ago)
- Topics: laravel, laravel-pwa
- Language: PHP
- Homepage:
- Size: 46.9 KB
- Stars: 209
- Watchers: 3
- Forks: 40
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE.md
Awesome Lists containing this project
README
[![Latest Stable Version](http://poser.pugx.org/ladumor/laravel-pwa/v)](https://packagist.org/packages/ladumor/laravel-pwa)
[![Daily Downloads](http://poser.pugx.org/ladumor/laravel-pwa/d/daily)](https://packagist.org/packages/ladumor/laravel-pwa)
[![Monthly Downloads](http://poser.pugx.org/ladumor/laravel-pwa/d/monthly)](https://packagist.org/packages/ladumor/laravel-pwa)
[![Total Downloads](http://poser.pugx.org/ladumor/laravel-pwa/downloads)](https://packagist.org/packages/ladumor/laravel-pwa)
[![License](http://poser.pugx.org/ladumor/laravel-pwa/license)](https://packagist.org/packages/ladumor/laravel-pwa)
[![PHP Version Require](http://poser.pugx.org/ladumor/laravel-pwa/require/php)](https://packagist.org/packages/ladumor/laravel-pwa)# Laravel PWA
## You can follow this video tutorial as well for installation.[](https://youtu.be/9H-T81KQPyo)
## Watch Other Lavavel tutorial here
[](https://www.youtube.com/channel/UCuCjzuwBqMqFdh0EU-UwQ-w?sub_confirmation=1))## Installation
Install the package by the following command, (try without `--dev` if you want to install it on production environment)
composer require --dev ladumor/laravel-pwa
## Add Provider
Add the provider to your `config/app.php` into `provider` section if using lower version of laravel,
Ladumor\LaravelPwa\PWAServiceProvider::class,
## Add Facade
Add the Facade to your `config/app.php` into `aliases` section,
'LaravelPwa' => \Ladumor\LaravelPwa\LaravelPwa::class,
## Publish the Assets
Run the following command to publish config file,
php artisan laravel-pwa:publish
## Configure PWA
Add following code in root blade file in header section.
Add following code in root blade file in before close the body.
if ("serviceWorker" in navigator) {
// Register a service worker hosted at the root of the
// site using the default scope.
navigator.serviceWorker.register("/sw.js").then(
(registration) => {
console.log("Service worker registration succeeded:", registration);
},
(error) => {
console.error(`Service worker registration failed: ${error}`);
},
);
} else {
console.error("Service workers are not supported.");
}
### License
The MIT License (MIT). Please see [License](LICENSE.md) File for more information## Note
PWA only works with https. so, you need to run either with `php artisan serve` or create a virtual host with https.
you can watch the video for how to create a virtual host with HTTPS[](https://youtu.be/D5IqDcHyXSQ)