承接 976-tuna/pwa 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

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

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: Blade

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-04-09