承接 mvaliolahi/notify 相关项目开发

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

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

mvaliolahi/notify

Composer 安装命令:

composer require mvaliolahi/notify

包简介

Framework agnostic PHP library to simplify interact with common messaging platforms.

README 文档

README

Framework agnostic PHP library to simplify interact with common messaging platforms, but Slack for now!

Install

composer require mvaliolahi/notify

Getting start

$notify = new Notify(new SlackDriver([
    'web_hook' => 'your slack web-hook'
]));

$notify->send((new Slack)->text('Hello World!'));

Develop Guide

What is a bot? / How can i create a new one?

Bot is a definition for any class that implements Mvaliolahi\Notify\Contracts\Bot, bot can interact with user to collect all necessary information to pass into $notify->send() method.

when bots passed to $notify->send(), the notify object is able to send this information to any messaging platform, obviously using specified Driver.

What is driver? / How can i implement it for other platforms?

Driver is a class that implements Mvaliolahi\Notify\Contracts\Driver, the only responsibility of driver is fetching essential data from $bot object, and implement related logic to send through messaging-platform.

it is clear enough that$notify->send() is just a wrapper around driver execute() method.

Slack Bot

The code shows you everything :)

(new Slack)
->text('Normal text')
->format()->pre('text') // like <pre> tag in html
->format()->bold('Bold text.')
->format()->italic('Italic text.')
->format()->blockQuotes('Italic text.')
->format()->strikeThrough('Italic text.')
->format()->code('<p> The only thing we need is just words.</p>')

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-03-04

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固