Skip to content

Liujinyong-Extension/laravel-dingding

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

laravel-dingding

基于laravel11版本开发组件库

【使用前准备】

  • 步骤一:完成创建应用的流程
  • 步骤二:获取应用凭证信息,获取应用 Client ID 、Client Secret和AgentID
  • 步骤三:申请接口权限,申请工作通知相关接口的权限。

【使用方法】

<?php
require __DIR__ . '/../vendor/autoload.php';
use  Liujinyong\LaravelDingding\Handler\users;
use  Liujinyong\LaravelDingding\Handler\message;


$clientId = "";
$clientSecret = "";
$agentId = "";

//【用户信息】
$handle = new users\UserController($clientId, $clientSecret, $agentId);
//根据手机号获取用户ID
$userId = $handle->getUserIdByMobile("153****2234");
//更据用户ID获取用户信息
$user  = $handle->getUserInfo('052*********5003');


//【工作通知】

$handle = new message\MessageController($clientId, $clientSecret, $agentId);
//发送工作消息通知 参数可参考
// https://open.dingtalk.com/document/development/message-types-and-data-format
$user = $handle->workNotification($msg, $userIdList, $deptIdList, $toAllUser);




About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages