{"id":29259085,"url":"https://github.com/birjemin/module-generator","last_synced_at":"2026-04-27T01:31:33.047Z","repository":{"id":62494453,"uuid":"133203123","full_name":"Birjemin/module-generator","owner":"Birjemin","description":":nut_and_bolt: 不太喜欢用的老的代码风格生成器 :rainbow:","archived":false,"fork":false,"pushed_at":"2018-09-14T02:05:18.000Z","size":17,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-17T05:46:47.942Z","etag":null,"topics":["laravel","module-generator","self"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Birjemin.png","metadata":{"files":{"readme":"Readme.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-05-13T03:42:54.000Z","updated_at":"2018-09-28T06:12:10.000Z","dependencies_parsed_at":"2022-11-02T11:30:59.821Z","dependency_job_id":null,"html_url":"https://github.com/Birjemin/module-generator","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/Birjemin/module-generator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Birjemin%2Fmodule-generator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Birjemin%2Fmodule-generator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Birjemin%2Fmodule-generator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Birjemin%2Fmodule-generator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Birjemin","download_url":"https://codeload.github.com/Birjemin/module-generator/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Birjemin%2Fmodule-generator/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263457308,"owners_count":23469302,"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":["laravel","module-generator","self"],"created_at":"2025-07-04T06:14:03.475Z","updated_at":"2026-04-27T01:31:33.019Z","avatar_url":"https://github.com/Birjemin.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# module-generator\n\n## 游戏简介\n\n为laravel生成如下的项目结构，方便管理和书写。\n\n## 游戏地图\n\n```\napp |\n    |- Base |\n            |--- Repository\n            |--- Transformer\n            |--- Job\n\n    |- Module |\n              |--- Xxxx   |\n                          |--- Conf\n                          |--- Model\n                          |--- Provider\n                          |--- Repository\n                          |--- Service      \n                          |--- Transformer      \n                          |--- XxxInTrait.php      \n                          |--- XxxModule.php      \n                          |--- XxxModuleInterface.php      \n                          |--- XxxOutTrait.php      \n```\n\n## 游戏说明\n\n* app为项目目录：\n    * Module为模块目录，将项目分成相应的模块；\n        * Config为配置目录（对内）\n        * Models为数据库Model目录（对内）\n        * Provider为注册目录\n        * Repository为数据库操作Model的仓库（对内）\n        * Service为处理复杂逻辑（对内）\n        * Transformer方法来格式化输出数据（对外）\n        * Module文件为模块入口（对外）\n        * OutTrait为对外暴露Module和Transformer文件出口（对外）\n        * InTrait为调用其他模块的入口（对内）\n\n## 游戏规则\n\n```\n1.Controller只能通过OutTrait访问模块，OutTrait只能暴露Module和Transformer这两个对外的文件；\n2.Model只能被Repository调用；\n3.Repository和Service只能被对应模块中的Module调用，不能对外；\n4.跨模块调用只能调用模块的Module，不能调用模块里面其他对象\n```\n\n## 使用说明\n\n* 引入\n\n```\ncomposer require birjemin/module-generator\n```\n\n* 命令使用\n\n```\nphp artisan birjemin:module-generator moduleName \n```\n\n* 疑问\n\n\u003e laravel version \u003e 5.5\n\n\u003e [https://github.com/Birjemin/laravel-generator](https://github.com/Birjemin/laravel-generator)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbirjemin%2Fmodule-generator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbirjemin%2Fmodule-generator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbirjemin%2Fmodule-generator/lists"}