liujinyong / laravel-dingding
基于钉钉开放平台的laravel-php-api集成
Installs: 2
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
pkg:composer/liujinyong/laravel-dingding
Requires
- php: ^8.2
- guzzlehttp/guzzle: ^7.9.2
This package is auto-updated.
Last update: 2025-10-22 07:19:59 UTC
README
基于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);