976-tuna/pwa
最新稳定版本:v1.1.8
Composer 安装命令:
composer require 976-tuna/pwa
包简介
PWA
README 文档
README
Installation
composer require 976-tuna/pwa php artisan vendor:publish
Integration
to add a install button to your site, add this
@include('pwa::components.pwa-install-button')
Add the following to your layout file:
In the <head> section:
<link rel="manifest" href="{{ url('/manifest.json') }}">
In the <body> section:
<script> if ('serviceWorker' in navigator) { window.addEventListener('load', function() { navigator.serviceWorker.register('/serviceworker.js') .then(function(registration) { //console.log('Service Worker registered with scope:', registration.scope); }) .catch(function(error) { //console.log('Service Worker registration failed:', error); }); }); } </script>
where ever you would like the button to show add this
@include('pwa::components.pwa-install-button')
统计信息
- 总下载量: 18
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-04-09