app = $app; $this->agentId = $agentId ? $agentId : config('dingtalk.agent_id'); } public function sendCorporationMessage($userIdList, $msg, $agentId = '') { $params = [ 'agent_id' => $agentId ? $agentId : $this->agentId, 'userid_list' => $userIdList, 'msg' => is_array($msg) ? json_encode($msg) : $msg ]; return $this->app->conversation->sendCorporationMessage($params); } }