承接 mikaelkael/ntfy-notifier 相关项目开发

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

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

mikaelkael/ntfy-notifier

最新稳定版本:v2.1.0

Composer 安装命令:

composer require mikaelkael/ntfy-notifier

包简介

Symfony Ntfy Notifier Bridge

README 文档

README

Build Status License

Provides Ntfy integration for Symfony Notifier. The component should be introduced in Symfony 6.4 with this PR #50131. This bundle provides same functionalities for Symfony 5.4.x to 6.3.x.

DSN example

# .env
NTFY_DSN=ntfy://[USER:PASSWORD]@default[:PORT]/TOPIC?[secureHttp=[on]]

where:

  • URL is the ntfy server which you are using
    • if default is provided, this will default to the public ntfy server hosted on ntfy.sh.
  • TOPIC is the topic on this ntfy server.
  • PORT is an optional specific port.
  • USERand PASSWORD are username and password in case of access control supported by the server

In case of a non-secure server, you can disable https by setting secureHttp=off.

Enable texter

# config/packages/notifier.yaml
framework:
    notifier:
        texter_transports:
            nfty: '%env(NTFY_DSN)%'

Send push message

// src/Controller/TestController.php
namespace App\Controller;

use Symfony\Component\Notifier\Message\SmsMessage;
use Symfony\Component\Notifier\TexterInterface;
use Symfony\Component\Routing\Annotation\Route;

class TestController
{
    /**
     * @Route("/test")
     */
    public function test(TexterInterface $texter)
    {
        $pushMessage = new PushMessage(
            'Title',
            'Message content',
            new NtfyOptions(['tags' => ['warning'], 'priority' => 5])
        );
        $result = $texter->send($pushMessage);

        // ...
    }
}

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-02-07

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固