paid_at !== null) { $view = 'notifications.user.balance'; $notifiable->load('user'); $user = $notifiable->user; $wecom_key = config('settings.wecom.robot_hook.billing'); $data = [ 'balance' => $notifiable, 'user' => $user, ]; $resp = Http::post('https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=' . $wecom_key, [ 'msgtype' => 'markdown', 'markdown' => [ 'content' => view($view, $data)->render(), ], ]); if (!$resp->successful()) { Log::error('企业微信机器人发送失败', $data); } } } } }