nhalstead/php-facilitator 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

nhalstead/php-facilitator

Composer 安装命令:

composer require nhalstead/php-facilitator

包简介

Trigger Webhooks to post data to channels in php. This will work with Slack, Discord, and other systems that use WebHooks.

README 文档

README

Using the Basic Package you can Post Requests to Slack, Discord and other Services that have WebHook Endpoints with Ease!

This is a package for PHP, So it is PSR4 compliant and can be used with or without composer.

Zero Dependencies with exception of CURL.

The System is even ready for you to add you own Custom Webhook Endpoints.

Supported Services

Name Full Support Class
Custom Events Yes
Slack Yes nhalstead\Endpoints\SlackWebhook
Discord Yes nhalstead\Endpoints\DiscordWebhook
IFTTT Yes nhalstead\Endpoints\IFTTTWebhook

Installation

You can install the package via composer

composer require nhalstead/php-facilitator

Alternatively you can clone the code from GitHub

git clone https://github.com/nhalstead/php-facilitator.git

How to use:

Load the Package using Composer

```php
>require_once("../vendor/autoload.php"); // Composer Method, Loading by PSR4
>use nhalstead\Facilitator\Facilitator;
>```

This will send an Payload to a Specific channel on the specified event.

use nhalstead\Facilitator\Facilitator;
use nhalstead\Facilitator\Endpoints\DiscordWebhook;

// Create new Queue
$queue = new Facilitator();

// Make new Event
$newEvent = new DiscordWebhook("[DISCORD WEBHOOK URL]");
$newEvent->username("John");
$newEvent->avatar("https://png.icons8.com/clouds/50/000000/megaphone.png");
$newEvent->message("Hello");


// Add and Send Events in Queue
$queue->addEvent($newEvent);
$queue->sendEvents();

For more Examples check out the /examples folder.

Contributors

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-08-03

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固