dd4you/pwa
最新稳定版本:v1.0.0
Composer 安装命令:
composer require dd4you/pwa
包简介
This package used for the make pwa website quickly.
README 文档
README
Laravel PWA
Installation
Install the package by the following command,
composer require dd4you/pwa
Publish the Assets
Run the following command to publish config file,
php artisan dd4you:install-pwa
Configure PWA
Add following code in root blade file in header section.
<!-- PWA -->
<meta name="theme-color" content="#6777ef"/>
<link rel="apple-touch-icon" href="{{ asset('logo.PNG') }}">
<link rel="manifest" href="{{ asset('/manifest.json') }}">
Add following code in root blade file in before close the body.
<script src="{{ asset('/sw.js') }}"></script>
<script>
if (!navigator.serviceWorker.controller) {
navigator.serviceWorker.register("/sw.js").then(function (reg) {
console.log("Service worker has been registered for scope: " + reg.scope);
});
}
</script>
License
The MIT License (MIT). Please see License File for more information
统计信息
- 总下载量: 9
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-12-25