Looks like an app, feels like an app, but IS NOT an app.
Looks like an app, feels like an app, but IS NOT an app.
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
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.
Add the following to your composer.json file :
"require": {
"silviolleite/laravelpwa": "~2.0.3",
},or execute
composer require silviolleite/laravelpwa --prefer-dist$ php artisan vendor:publish --provider="LaravelPWA\Providers\LaravelPWAServiceProvider"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:
[
'path' => '/images/icons/icon-512x512.png',
'sizes' => '512x512',
'purpose' => 'any'
],
Obs: In the custom tag you can insert personalized tags to manifest.json like this e.g:
...
'custom' => [
'tag_name' => 'tag_value',
'tag_name2' => 'tag_value2',
...
]
...Include within your `` the blade directive @laravelPWA.
My Title
...
@laravelPWA
...
My content
...
This should include the appropriate meta tags, the link to manifest.json and the serviceworker script.
how this example:
While running the Laravel test server:
/manifest.json is being served/serviceworker.js is being servedBy default, the service worker implemented by this app is:
…To customize service worker functionality, update the public_path/serviceworker.js.
By default, the offline view is implemented in resources/views/vendor/laravelpwa/offline.blade.php
@extends('layouts.app')
@section('content')
You are currently not connected to any networks.
@endsectionTo customize update this file.
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.
No open issues yet, or sync has not completed.