{"id":15282353,"url":"https://github.com/zacksleo/yii2-wechat","last_synced_at":"2025-04-12T22:55:02.816Z","repository":{"id":57089058,"uuid":"75350019","full_name":"zacksleo/yii2-wechat","owner":"zacksleo","description":"Yii2 wechat module","archived":false,"fork":false,"pushed_at":"2019-07-01T12:39:12.000Z","size":453,"stargazers_count":6,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-12T22:54:59.337Z","etag":null,"topics":["wechat","yii2","yii2-extension"],"latest_commit_sha":null,"homepage":null,"language":"CSS","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/zacksleo.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":"2016-12-02T01:51:43.000Z","updated_at":"2021-05-17T06:42:20.000Z","dependencies_parsed_at":"2022-08-20T16:00:37.605Z","dependency_job_id":null,"html_url":"https://github.com/zacksleo/yii2-wechat","commit_stats":null,"previous_names":[],"tags_count":23,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zacksleo%2Fyii2-wechat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zacksleo%2Fyii2-wechat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zacksleo%2Fyii2-wechat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zacksleo%2Fyii2-wechat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zacksleo","download_url":"https://codeload.github.com/zacksleo/yii2-wechat/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248643048,"owners_count":21138353,"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","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":["wechat","yii2","yii2-extension"],"created_at":"2024-09-30T14:25:17.684Z","updated_at":"2025-04-12T22:55:02.796Z","avatar_url":"https://github.com/zacksleo.png","language":"CSS","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Yii2 后台微信模块\n\n[![Latest Stable Version](https://poser.pugx.org/zacksleo/yii2-wechat/version)](https://packagist.org/packages/yii2-wechat/phpsms)\n[![Total Downloads](https://poser.pugx.org/zacksleo/yii2-wechat/downloads)](https://packagist.org/packages/yii2-wechat/phpsms)\n[![License](https://poser.pugx.org/zacksleo/yii2-wechat/license)](https://packagist.org/packages/yii2-wechat/phpsms)\n\n## 准备工作\n\n### 首先配置 [yii2-easy-wechat](https://github.com/jianyan74/yii2-easy-wechat)\n\n### 配置模块依赖\n\n\u003e 注意 layout和layoutPath写实际使用的布局文件, 文件内容参考 src/layouts\n\n#### 配置 component\n\n```\n'components' =\u003e [\n\n   'settings' =\u003e [\n        'class' =\u003e 'pheme\\settings\\components\\Settings',\n    ],\n]\n\n```\n\n\n\n#### 配置 modules\n\n```\n'modules' =\u003e [\n\n    'settings' =\u003e [\n       'class' =\u003e 'pheme\\settings\\Module',\n    ],\n    'treemanager' =\u003e [\n          'class' =\u003e 'kartik\\tree\\Module',\n      ],\n    'wechat' =\u003e [\n        'class' =\u003e 'zacksleo\\yii2\\wechat\\backend\\Module',\n    ],\n]\n\n```\n\n## 安装\n\n```\ncomposer require zacksleo\\yii2-wechat --prefer-dist\n\n```\n\n## 数据库迁移\n\n### 配置数据库迁移\n\n对于高级模板（yii2-app-advanced）, 配置 `console/config/main.php` 文件：\n\n```\n    'controllerMap' =\u003e [\n        'migrate' =\u003e [\n            'class' =\u003e 'yii\\console\\controllers\\MigrateController',\n            'migrationPath' =\u003e [\n                '@console/migrations/',\n                '@pheme/settings/migrations',\n                '@zacksleo/yii2/wechat/migrations'\n            ],\n        ],\n    ],\n\n```\n对于基础模板 （yii2-app-basic）, 配置 `config/console.php` 文件：\n\n```\n    'controllerMap' =\u003e [\n        'migrate' =\u003e [\n            'class' =\u003e 'yii\\console\\controllers\\MigrateController',\n            'migrationPath' =\u003e [\n                '@app/migrations/',\n                '@pheme/settings/migrations',\n                '@zacksleo/yii2/wechat/migrations'\n            ],\n        ],\n    ],\n\n```\n\n### 执行迁移\n\n```\nyii migrate/up\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzacksleo%2Fyii2-wechat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzacksleo%2Fyii2-wechat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzacksleo%2Fyii2-wechat/lists"}