# robot-web-hook **Repository Path**: a67793581_admin/robot-web-hook ## Basic Information - **Project Name**: robot-web-hook - **Description**: No description available - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-10-29 - **Last Updated**: 2025-11-07 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # RobotWebHook - EN:This is a robot message push, supporting pin and enterprise wechat's robot web hook interface. - ZH:这是一个机器人消息推送,支持企业微信和钉钉的机器人 web hook 接口。 # Demo ```php '你的地址', //客户端驱动类型 'client_drive' => 'EnterpriseWeChatClient', ]; try { //创建客户端对象 $Client = Service::getInstance($config)->getClient(); try { throw new \Exception('测试用异常', 123456); } catch (\Exception $e) { //将异常信息格式化为 markdown 数据格式 $exception = [ 'app_name' => '应用名称', 'env' => '当前环境', 'code' => $e->getCode(), 'message' => $e->getMessage(), 'file' => $e->getFile(), 'line' => $e->getLine(), 'mentioned_list' => '',//根据名字@需要提醒的人 默认不提醒 'mentioned_mobile_list' => '',//根据手机号@需要提醒的人 默认不提醒 ]; $data = $Client->markdownExceptionFormat($exception); $res = $Client->markdownSend($data); print_r($res); } } catch (RobotWebHookException $e) { var_dump('捕获异常', $e->getMessage(), $e->getCode()); } ```