Download the PHP package edwinylil1/laravelwebapp without Composer
On this page you can find all versions of the php package edwinylil1/laravelwebapp. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download edwinylil1/laravelwebapp
More information about edwinylil1/laravelwebapp
Files in edwinylil1/laravelwebapp
Package laravelwebapp
Short Description Designed to provide an experience similar to a mobile or desktop application.
License MIT
Informations about the package laravelwebapp
Laravel (WebApp) Web Application
This Laravel package turns your website into a web application. Accessing your site on a mobile or desktop device will prompt you to add the application to your home screen.
You will be able to see the launcher icon of your application from the home screen, and upon tapping it, your web application will be displayed. Therefore, it is crucial that your application provides all the navigation within the HTML (without relying on the browser's forward or backward buttons).
See too the Laravel Web App Demo
Requirements
This type of web applications requires HTTPS to enable installation functionality unless they are served from localhost. If you are not yet using HTTPS on your site, please refer to Let's Encrypt and ZeroSSL.
Installation
We can add the dependency in our composer.json
file:
or execute
Publish
We need to make the package files public in the application:
Configuration
You can configure the name, description, icons, presentations, and more of your application in the file created at in config/laravelwebapp.php
.
Example of the file:
You can specify the size of each icon as key of the array or specify it:
Note: in the custom
tag, you can insert custom tags in manifest.json
like this, for example:
We need to add the package's Blade directive @laravelWebApp
to our headers <head>
.
This should include the appropriate meta tags, the link to manifest.json
and the serviceworker script.
If you view the code from your browser, it will look like 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 web app is configured correctly.
- Use the "Add to home screen" 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/laravelwebapp/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 EVillegas an email.