All Projects → chowjiawei → laravel-help-plugin

chowjiawei / laravel-help-plugin

Licence: MIT license
Laravel综合辅助工具包. 消息通知、获取国家列表 支持钉钉机器人 企业微信机器人 微信模板消息/广播驱动及消息通知 、Openexchangerates 汇率实时获取,自定义汇率获取、国家列表、汉语拼音转换威妥玛式拼音

Programming Languages

PHP
23972 projects - #3 most used programming language

Projects that are alternatives of or similar to laravel-help-plugin

dingtalk
DingTalk(dingding) 是钉钉机器人的 go 实现。支持 Docker、Jenkinsfile、命令行模式,module 模式,加签安全设置,支持链式语法创建消息,支持文本、链接、Markdown、ActionCard、FeedCard消息类型; DingTalk (dingding) is the go implementation of the DingTalk robot. Support Docker, Jenkinsfile, command line mode, module mode, signature security settings, chain syntax to create messages, support text, link, markd…
Stars: ✭ 187 (+240%)
Mutual labels:  dingtalk, dingtalk-robot
hubot-dingtalk
hubot-dingtalk:支持钉钉Outgoing
Stars: ✭ 29 (-47.27%)
Mutual labels:  dingtalk, dingtalk-robot
deepin.com.dingtalk.com
This is a Unofficial deepin-wine container for Dingtalk | 这是个非官方钉钉容器
Stars: ✭ 39 (-29.09%)
Mutual labels:  dingtalk
webwx-api
web wecat helper
Stars: ✭ 23 (-58.18%)
Mutual labels:  wechat-robot
alertmanager-dingtalk-hook
alertmanager dingtalk webhook simple server 🍋 🍊 🍒 🍰 🍇 🍉 🍓 🌽 🍑
Stars: ✭ 67 (+21.82%)
Mutual labels:  dingtalk
egg-dingtalk
egg plugin for dingtalk
Stars: ✭ 29 (-47.27%)
Mutual labels:  dingtalk
django-prices-openexchangerates
openexchangerates.org support for django-prices
Stars: ✭ 33 (-40%)
Mutual labels:  openexchangerates
DingTalkUI
非越狱环境下修改钉钉位置,依赖Monkeydev/DingtalkPod
Stars: ✭ 12 (-78.18%)
Mutual labels:  dingtalk
beihu-boot
企业级快速开发框架集,提供各种组件的模板方法包装,简化使用成本,供参考学习!
Stars: ✭ 32 (-41.82%)
Mutual labels:  dingtalk
GetUpEarly
Android App 早起打卡;支持蚂蚁森林;蚂蚁庄园;阿里运动;QQ打卡;QQ早起奖金;微博早起奖金;支付宝早起打卡挑战赛;支付宝天天红包赛;淘宝早起打卡挑战赛;京东金融早起打卡;支付宝健康早起打卡;支付宝运动打卡领健康金 等
Stars: ✭ 115 (+109.09%)
Mutual labels:  dingtalk
Dingbot
基于python标准库,为钉钉群机器人打造的轻量级SDK
Stars: ✭ 23 (-58.18%)
Mutual labels:  dingtalk
dingtalk-encrypt
dingTalk encrypt Node Version. 钉钉的非官方nodejs版AES加解密库 sdk
Stars: ✭ 16 (-70.91%)
Mutual labels:  dingtalk
react-local-currency
💵 💴Shows the price of your services in the customer's currency 💶 💷
Stars: ✭ 21 (-61.82%)
Mutual labels:  openexchangerates
weex-dingtalk-cli
👽 A simple CLI for scaffolding Dingtalk Weex Microapp projects.
Stars: ✭ 33 (-40%)
Mutual labels:  dingtalk
autojs-dingtalk
利用autojs进行钉钉自动打卡的脚本
Stars: ✭ 37 (-32.73%)
Mutual labels:  dingtalk
notify
推送通知 sdk(Bark、Chanify、钉钉群机器人、Discord、邮件、飞书群机器人、Gitter、Google Chat、iGot、Logger、Mattermost、Now Push、PushBack、Push、PushDeer、PushPlus、QQ 频道机器人、Rocket Chat、Server 酱、Showdoc Push、Slack、Telegram、Webhook、企业微信群机器人、息知、Zulip)。
Stars: ✭ 335 (+509.09%)
Mutual labels:  dingtalk
Dingtalk
钉钉桌面版,基于electron和钉钉网页版开发,支持Windows、Linux和macOS
Stars: ✭ 2,688 (+4787.27%)
Mutual labels:  dingtalk
caesar
持续集成
Stars: ✭ 40 (-27.27%)
Mutual labels:  dingtalk
yii2-dingtalk
yii2钉钉接口
Stars: ✭ 23 (-58.18%)
Mutual labels:  dingtalk
PSImageEditors
一个简而至美的图片编辑器 (仿钉钉与微信的图片编辑组件)
Stars: ✭ 32 (-41.82%)
Mutual labels:  dingtalk
  • 通知发送(包括但不限于以下频道【更多待接入】)
    • 钉钉机器人
    • 企业微信机器人
    • 微信模板消息
    • 飞书机器人
  • 威妥码拼音互转获取
  • 汇率试试互转获取(Openexchangerates Api)
  • 全球城市中英互转获取 及更新

本包将持续更新!请详细文档托管 https://learnku.com/docs/laravel-help-plugin

如发现bug 请直接提issue或者直接提pr,造成的不便请谅解。

Laravel辅助工具包

目录

JetBrains 支持的项目

非常感谢 Jetbrains 为我提供了从事这个和其他开源项目的许可。

安装说明

环境要求 本包依托于Laravel框架,其他框架暂不适用

  • php => ^7.0
  • guzzlehttp/guzzle => ^6.3"
  • laravel/framework => ~5.5|~6.0|~7.0|~8.0|~9.0
  • overtrue/laravel-wechat => ~5.0

使用composer安装

composer require chowjiawei/laravel-help-plugin

发布配置文件

  • 使用工具包请运行Artisan命令

php artisan vendor:publish --provider="Chowjiawei\Helpers\Providers\HelpPluginServiceProvider"

  • 如若使用微信模板消息则需要发布easywechat配置,本包默认内置easywechat:

php artisan vendor:publish --provider="Overtrue\LaravelWeChat\ServiceProvider" 微信包的配置 按需填写 公共号配置 official_account 配置省略

注册facade

本报提供laravel Facade便捷,如需使用可按如下配置

打开config/app.php

找到 providers 项添加

\Chowjiawei\Helpers\Providers\HelpPluginServiceProvider::class,

找到 'aliases'添加

'Helper'=>\Chowjiawei\Helpers\Facade\Helper::class

消息驱动

钉钉机器人消息发送驱动

use Chowjiawei\Helpers\Channels\DingtalkRobotChannel;

public function via($notifiable)
{
    return [DingtalkRobotChannel::class];
}

微信机器人消息发送驱动

use Chowjiawei\Helpers\Channels\WechatRobotChannel;

public function via($notifiable)
{
    return [WechatRobotChannel::class];
}

微信模板消息发送驱动

该驱动支持单用户发送和广播功能

use Chowjiawei\Helpers\Channels\WechatTemplateMessageChannel;

public function via($notifiable)
{
    return [WechatTemplateMessageChannel::class];
}
Notification::route('dingtalk_robot', $key)->notify(new YourNotification());
Notification::route('wechat_robot', $key)->notify(new YourNotification());
Notification::route('Wechat_template_message', $key)->notify(new YourNotification());

飞书机器人消息发送驱动

use Chowjiawei\Helpers\Channels\DingtalkRobotChannel;

public function via($notifiable)
{
    return [DingtalkRobotChannel::class];
}

直接消息推送

钉钉:

use Chowjiawei\Helpers\Notifications\DingtalkRobotNotification;

Notification::route('dingtalk_robot', env("DINGTALK_ROBOT")) ->notify(new DingtalkRobotNotification($message,$title));

企业微信:

use Chowjiawei\Helpers\Notifications\WechatRobotNotification;

Notification::route('wechat_robot', env("WECHAT_ROBOT)")) ->notify(new WechatRobotNotification($message));

微信模板消息:

use Chowjiawei\Helpers\Notifications\WechatTemplateMessageNotification;

  • 不指定用户(广播用户)

Notification::route('WechatTemplateMessage', null)->notify(new WechatTemplateMessageNotification($data));

  • 指定用户
        $user=['odAYnxOVy7vS266666666','odAYnxEuuTCf66666fov276666'];

        $template="iA2V1K45vS8IgUEvE666666EH3R-V-66666";

        $data=[

            "order_id"=>[

                "value"=>"20200414234478934343",

                "color"=>"#173177"

            ],

            "package_id"=>[

                "value"=>"SF4345454534",

                "color"=>"#173177"

            ],

            "remark"=>[

                "value"=>'模板消息发送',

                "color"=>"#173177"

            ]

        ];

        Notification::route('WechatTemplateMessage', $user)->notify(new WechatTemplateMessageNotification($data, $template));

飞书:

use Chowjiawei\Helpers\Notifications\LarkRobotNotification;

Notification::route('lark', env("LARK_ROBOT")) ->notify(new DingtalkRobotNotification($message));

Artisan命令示例:

由于业务不同,工具默认提供了通知Notification模板,可以通过extend Artisan命令选择代码生成器生成

国家获取转换

use Chowjiawei\Helpers\PhpHelps\LaravelHelp;

初始化辅助工具
$help=new LaravelHelp();

获取所有国家
$help->getAllCountry();

根据国家代码转国家名字 
$help->getCountryName('CN');
根据国家名字转国家代码
$help->getCountryName('China');

or 还有更多可以下载包后体验哦

Helper::allCountry();

Openexchangerates汇率实时获取

use Chowjiawei\Helpers\Exchange\Exchange;
//获取实时汇率
$help->getChangerates();

将为您返回完整的汇率及接口信息,以下省略篇幅

{
  "disclaimer": "Usage subject to terms: https://openexchangerates.org/terms",
  "license": "https://openexchangerates.org/license",
  "timestamp": 1622097300,
  "base": "USD",
  "rates": {
    "AED": 3.6731,
    "AFN": 79.130257,
    "ALL": 101.073262,
    "AMD": 520.828816,
    "ANG": 1.796011,
    "AOA": 643.121,
    "ARS": 94.4963,
    "AUD": 1.291358,
    "AWG": 1.8,
    "AZN": 1.700805,
    "BAM": 1.604705,
    "BBD": 2,
    "BDT": 85.048855,
    "BGN": 1.601902,
    "BHD": 0.377012,
    "BIF": 1974.680206,

use Chowjiawei\Helpers\Exchange\Exchange;
//获取特定汇率
$help->getSymbolChangerates(['GBP','EUR','AED','CAD']);

将为您返回指定的汇率及接口信息

{
    disclaimer: "https://openexchangerates.org/terms/",
    license: "https://openexchangerates.org/license/",
    "timestamp": 1424127600,
    "base": "USD",
    "rates": {
        "AED": 3.67295,
        "CAD": 0.99075,
        "EUR": 0.793903,
        "GBP": 0.62885
    }
}

扩展Artisan命令

插件为您提供了一个支持中文和英文的扩展命令,您可以用命令呼出,命令提供了以下功能

php artisan extend --chinese 中文

php artisan extend 英文

威妥码拼音

单汉语拼音转威妥码拼音

Helper::changeHWWord("zhou");

汉语拼音转威妥码拼音

长句汉语拼音转威妥码拼音

Helper::changeHWWord("zhou jia wei hao shuai");

汉语拼音转威妥码拼音

单汉语拼音转威妥码拼音

Helper::changeWHWord("chou");

威妥码拼音转汉语拼音

长句汉语拼音转威妥码拼音

Helper::changeWHWord("chou chia wei hao shuai a");

威妥码拼音转汉语拼音

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].