承接 ayarigab/pla 相关项目开发

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

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

ayarigab/pla

Composer 安装命令:

composer require ayarigab/pla

包简介

Write progressive Web Applications with laravel webframework.

README 文档

README

Latest Stable Version Daily Downloads Monthly Downloads Total Downloads License PHP Version Require

Laravel PWA

Installation

Install the package by the following command,

composer require ayarigab/pla

Add Provider

Add the provider to your config/app.php into provider section if using lower version of laravel,

Ayarigab\Pla\PLAServiceProvider::class,

Add Facade

Add the Facade to your config/app.php into aliases section,

'PLA' => \Ayarigab\Pla\PLA::class,

Publish the Assets

Run the following command to publish config file,

php artisan pla:publish

Configure PLA

Add following code in root blade file in header section.

<!-- PLA  -->
<meta name="theme-color" content="#6777ef"/>
<link rel="apple-touch-icon" href="{{ asset('logo.PNG') }}">
<link rel="manifest" href="{{ asset('/manifest.json') }}">

Add the following code in your root blade file before closing the body tag.

<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

PLA is (MIT) Licensed. Please read the License file to know more.

统计信息

  • 总下载量: 7
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-03-22