Download the PHP package hanxiaoqingcheng/warning without Composer

On this page you can find all versions of the php package hanxiaoqingcheng/warning. 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 warning

预警发送

本扩展自带了邮件、短信、钉钉机器人、微信企业机器人、webhook等预警发送方式

安装

安装依赖

自动生成文件

选择Sy\Warning\WarningServiceProvider 若没有生成配置文件,可以尝试先执行

执行数据库迁移

本扩展已经设计好预警日志表和预警用户表

需要配置数据库表:warning_user_account 和 warning_tpls

warning_user_account表配置示例:

uid uname type account show
6 laowang phone 13888888888 1
6 用户名可不填(uid=6相当于用户组,不填写表示默认值) phone 13999999999 1
7 email [email protected] 1

warning_tpls表配置示例:

uid uname product warning_name type warning_tpl show
6 用户名,可不填,如6是某公司注册的账号,下面N个研发或者研发负责任,只需要配置不同uname 产品名称,必填 预警名称,可不填 预警类型:枚举,目前支持5种(email/phone/weixin/dingding/webhook),也可以填default 您扫描的关键字「#keywords#」,有#num#个新增未知风险待确认,请您前往 #url# 查看。 1

warning_tpls的type字段为default时,account表里面配置的账号,如果没有配置模板,则会走默认模板。

短信发送

本扩展使用的是聚合数据的短信发送功能,申请账号查看官网聚合数据短信发送

开启用户发送短信、邮件、钉钉机器人、webhook、微信企业机器人

开启任何一个功能,只需在数据库warning_user_account表配置用户即可使用

配置Mail

本扩展依赖laravel框架,并没有引入laravel已经存在的扩展。 配置laravel框架下config目录下的mail.php,不了解的可以自行查看laravel官方文档

调用

示例1

示例1:无需配置模板表,默认uid=1,$tplValue为自定义的内容

示例2

示例2:需要按照一定的规则配置模板表


All versions of warning with dependencies

PHP Build Version
Package Version
Requires php Version >=7.3.0
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 hanxiaoqingcheng/warning contains the following files

Loading the files please wait ...