{"id":17246219,"url":"https://github.com/hanson/wechat-notice","last_synced_at":"2025-07-21T17:32:36.680Z","repository":{"id":62514491,"uuid":"82043676","full_name":"Hanson/wechat-notice","owner":"Hanson","description":"微信消息模板发送","archived":false,"fork":false,"pushed_at":"2017-02-16T12:12:34.000Z","size":5,"stargazers_count":22,"open_issues_count":0,"forks_count":6,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-15T09:04:13.862Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Hanson.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-02-15T09:32:57.000Z","updated_at":"2023-07-27T08:15:29.000Z","dependencies_parsed_at":"2022-11-02T13:02:43.300Z","dependency_job_id":null,"html_url":"https://github.com/Hanson/wechat-notice","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/Hanson/wechat-notice","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hanson%2Fwechat-notice","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hanson%2Fwechat-notice/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hanson%2Fwechat-notice/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hanson%2Fwechat-notice/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Hanson","download_url":"https://codeload.github.com/Hanson/wechat-notice/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hanson%2Fwechat-notice/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266342809,"owners_count":23914262,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-21T11:47:31.412Z","response_time":64,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-15T06:32:48.589Z","updated_at":"2025-07-21T17:32:36.656Z","avatar_url":"https://github.com/Hanson.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# wechat-notice\n\nwechat-notcie 是基于 `laravel` 和 [EasyWechat](https://github.com/overtrue/wechat) 开发的微信消息模板通知功能\n\n## 安装\n\n```\ncomposer require hanson/wechat-notice\n```\n\n添加 `Hanson\\WechatNotice\\NoticeServiceProvider::class` 到 `app.php` 的 `providers` 中\n\n## 使用\n\n### config\n\n当不做任何设置时，Notice会自动读取 `config('services.wechat')` 的配置\n\n```\n\\WechatNotice::send($openId, $templateId, [\n    'first' =\u003e '系统异常',\n    'keyword1' =\u003e '',\n    'keyword2' =\u003e '',\n    'keyword3' =\u003e '',\n    'remark' =\u003e '请及时处理'\n]);\n```\n\n### 已存在实例\n\n\n```\n$wechat = new Application([\n    'app_id'  =\u003e $appId,\n    'secret'  =\u003e $secret,\n]);\n\n\\WechatNotice::setWechat($wechat)-\u003esend($openId, $templateId, [\n    'first' =\u003e '系统异常',\n    'keyword1' =\u003e '',\n    'keyword2' =\u003e '',\n    'keyword3' =\u003e '',\n    'remark' =\u003e '请及时处理'\n], null, '#af0505');\n```\n\n\n### 直接设置配置\n\n```\n\\WechatNotice::setConfig([\n    'app_id'  =\u003e $appId,\n    'secret'  =\u003e $secret,\n])-\u003esend($openId, $templateId, [\n    'first' =\u003e '系统异常',\n    'keyword1' =\u003e '',\n    'keyword2' =\u003e '',\n    'keyword3' =\u003e '',\n    'remark' =\u003e '请及时处理'\n]);\n```\n\n### 发送给多个用户\n\n```\n\\WechatNotice::send([$openId, $openId2, $openId3, ...], $templateId, [\n    'first' =\u003e '系统异常',\n    'keyword1' =\u003e '',\n    'keyword2' =\u003e '',\n    'keyword3' =\u003e '',\n    'remark' =\u003e '请及时处理'\n]);\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhanson%2Fwechat-notice","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhanson%2Fwechat-notice","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhanson%2Fwechat-notice/lists"}