Download the PHP package silviolleite/laravelpwa without Composer
On this page you can find all versions of the php package silviolleite/laravelpwa. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download silviolleite/laravelpwa
More information about silviolleite/laravelpwa
Files in silviolleite/laravelpwa
Package laravelpwa
Short Description Looks like an app, feels like an app, but NOT an app.
License MIT
Informations about the package laravelpwa
Laravel (PWA) Progressive Web Application
This Laravel package turns your project into a progressive web app. Navigating to your site on an Android phone will prompt you to add the app to your home screen.
Launching the app from your home screen will display your app. As such, it's critical that your application provides all navigation within the HTML (no reliance on the browser back or forward button).
See too the Laravel PWA Demo
Requirements
Progressive Web Apps require HTTPS unless being served from localhost. If you're not already using HTTPS on your site, check out Let's Encrypt and ZeroSSL.
Installation
Add the following to your composer.json
file :
or execute
Publish
Configuration
Configure your app name, description, icons and splashes in config/laravelpwa.php
.
You can specify the size of each icon as key of the array or specify it:
Obs: In the custom
tag you can insert personalized tags to manifest.json
like this e.g:
Include within your <head>
the blade directive @laravelPWA
.
This should include the appropriate meta tags, the link to manifest.json
and the serviceworker script.
how this example:
Troubleshooting
While running the Laravel test server:
- Verify that
/manifest.json
is being served - Verify that
/serviceworker.js
is being served - Use the Application tab in the Chrome Developer Tools to verify the progressive web app is configured correctly.
- Use the "Add to homescreen" link on the Application Tab to verify you can add the app successfully.
The Service Worker
By default, the service worker implemented by this app is:
To customize service worker functionality, update the public_path/serviceworker.js
.
The offline view
By default, the offline view is implemented in resources/views/vendor/laravelpwa/offline.blade.php
To customize update this file.
Contributing
Contributing is easy! Just fork the repo, make your changes then send a pull request on GitHub. If your PR is languishing in the queue and nothing seems to be happening, then send Silvio an email.