Download the PHP package wiseadmin/wise-notification without Composer

On this page you can find all versions of the php package wiseadmin/wise-notification. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package wise-notification

wiseadmin/wise-notification

ThinkPHP 8 多通道消息通知组件,支持邮件、短信、钉钉、站内信等通道,提供模板、中间件、事件驱动能力。

PHP Version ThinkPHP Packagist


特性

模块 说明
四通道内置 邮件(PHPMailer)、短信(阿里云/腾讯云双provider)、钉钉机器人(Webhook + 签名)、站内信
Manager-Driver 模式 NotificationManager 统一调度,支持注册自定义通道驱动
消息模板 NotificationTemplate 模型,支持多语言、变量替换
同步/异步 sync() 同步发送,不调用时默认走队列 (SendNotificationJob)
中间件管道 可追加 NotificationMiddleware,在发送前后插入自定义逻辑
批量发送 batch() 方法,Chunk 分批 + Delay 控制,返回 BatchSendResult
发送历史 NotificationHistory 模型,记录每次发送结果(状态/耗时/错误)
事件驱动 NotificationSending / NotificationSent / NotificationFailed
合并配置 支持与 ThinkPHP 应用配置递归合并

安装

按需安装通道 SDK:

提示:以上通道 SDK 为可选依赖,按实际使用的通道安装即可。


配置

发布配置文件:

配置文件 config/wise-notification.php:


使用指南

1. 接收者模型(Notifiable)

让用户模型实现 Notifiable 接口:

2. 发送通知(Facade)

3. 批量发送

4. 创建消息

5. 异步发送(队列)

默认不调用 sync() 时,通知通过队列异步发送:

6. 依赖注入方式

7. 自定义通道驱动

8. 中间件管道

9. 事件监听

10. 控制台命令


通道配置速查

邮件

配置项 说明
host SMTP 服务器地址
port 端口(587 TLS / 465 SSL)
username / password 认证凭据
encryption tls / ssl
from.address 发件人邮箱
from.name 发件人名称

短信

Provider 配置项 说明
aliyun access_key_id / access_secret RAM 用户 AK
aliyun sign_name 短信签名
aliyun template_map 模版CODE 映射
tencent secret_id / secret_key 云 API 密钥
tencent app_id 短信应用 ID
tencent sign_name 短信签名
tencent template_map 模版ID 映射

钉钉机器人

配置项 说明
webhook_url 机器人 Webhook 地址
secret 加签密钥(可选,用于安全设置)

目录结构


License

MIT


All versions of wise-notification with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1
topthink/framework Version ^8.0
topthink/think-queue Version ^3.0
topthink/think-migration Version ^3.0
wiseadmin/wise-support Version 1.0.*
topthink/think-orm Version ^3.0
guzzlehttp/guzzle Version ^7.0
ext-json Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package wiseadmin/wise-notification contains the following files

Loading the files please wait ...