承接 bentools/webpush-bundle 相关项目开发

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

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

bentools/webpush-bundle

最新稳定版本:0.13.1

Composer 安装命令:

composer require bentools/webpush-bundle

包简介

Send push notifications through Web Push Protocol to your Symfony users.

README 文档

README

Latest Stable Version License CI Total Downloads

Webpush Bundle

This bundle allows your app to leverage the Web Push protocol to send notifications to your users' devices, whether they're online or not.

With a small amount of code, you'll be able to associate your Symfony users to WebPush Subscriptions:

  • A single user can subscribe from multiple browsers/devices
  • Multiple users can subscribe from a single browser/device

This bundle uses your own persistence system (Doctrine or anything else) to manage these associations.

We assume you have a minimum knowledge of how Push Notifications work, otherwise we highly recommend you to read Matt Gaunt's Web Push Book.

Example Use cases

  • You have a todolist app - notify users they're assigned a task
  • You have an eCommerce app:
    • Notify your customer their order has been shipped
    • Notify your category manager they sell a product

Summary

  1. Installation
  2. The UserSubscription entity
  3. The UserSubscription manager
  4. Configure the bundle
  5. Enjoy!
  6. F.A.Q.

Getting started

This bundle is just the back-end part of the subscription process. For the front-end part, have a look at the webpush-client package.

Composer is your friend:

PHP8.1+ is required.

composer require bentools/webpush-bundle

⚠️ We aren't on stable version yet - expect some changes.

Generate your VAPID keys:

php bin/console webpush:generate:keys

You'll have to update your config with the given keys. We encourage you to store them in environment variables or in parameters.yml.

Next: Create your UserSubscription class

Tests

./vendor/bin/phpunit

License

MIT

Credits

This bundle leverages the minishlink/web-push library.

统计信息

  • 总下载量: 259.83k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 71
  • 点击次数: 2
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 71
  • Watchers: 9
  • Forks: 44
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 未知