1 Star 2 Fork 0

zhen/hyperf-devtool

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

安装

composer require zhen/hyperf-devtool --dev

工程目录结构

├── app                                 // 应用程序目录
│   └── Bar                             // bar领域目录
│       └──Controller                   // 控制器目录
│           └──Api                      // 前端相关接口
│           └──Admin                    // 后台相关接口
│       └──Config                       // 模块自定义配置目录
│       └──Events                       // 事件目录
│       └──Listener                     // 事件监听者
│       └──Constants                    // 常量
│       └──Database                     // 数据库迁移
│       └──Request                      // 请求验证目录
│       └──Interfaces                   // 接口目录
│       └──Model                        // 模型目录
│       └──Service                      // 核心业务逻辑
│       └──Dao                          // 数据库访问层
│       └──...                          // 其他自定义目录
│   └── README.md                       // 模块说明
│   └── ...                             // 以后增加的其他模块目录
├── config                              // 配置文件目录
├── core                                // 项目核心目录
│   └──Abstracts                        // 存放抽象类目录
│   └──Console                          // 存放自定义命令目录
│   └──Exception                        // 存放异常接管处理目录
│   └──Library                          // 公共类库目录
│   └──Listener                         // 存放事件监听目录
│   └──Traits                           // 存放复用类目录
├── vendor

相关命令说明

命令用法: php bin/hyperf.php 领域名称 模块名称(与 hyperf 相同)

# 初始化相关命令
+ ext-init:service          Initialize service directory and file  + ext-gen:aspect            Create a new aspect class  
# 代码生成相关命令
+ ext-gen:command           Create a new command class             
+ ext-gen:constant          Create a new constant class            
+ ext-gen:controller        Create a new controller class          
+ ext-gen:job               Create a new job class                 
+ ext-gen:listener          Create a new listener class            
+ ext-gen:middleware        Create a new middleware class          
+ ext-gen:process           Create a new process class             
+ ext-gen:request           Create a new form request class        
+ ext-gen:rocketmq-consumer Create a new rocketmq consumer class   
+ ext-gen:rocketmq-producer Create a new rocketmq producer class   
+ ext-gen:model             Create new model classe+              
+ ext-gen:migration         Generate a new migration file
# 数据迁移相关命令
+ ext-migrate               Run the database migrations            
+ ext-db:seed               Seed the database with records         
+ ext-gen:seeder            Create a new seeder class.

使用示例

# 初始化 Bar 领域的 Foo 功能
php bin/hyperf.php ext-init:service Bar Foo
# 在 Bar 领域下创建控制
php bin/hyperf.php ext-gen:controller Bar TestController
# 在 Bar 领域创建表单验证
php bin/hyperf.php ext-gen:request Bar TestRequest
The MIT License (MIT) Copyright (c) Zhen Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

hyperf 工程代码生成命令 展开 收起
README
MIT
取消

发行版

暂无发行版

贡献者

全部

语言

近期动态

不能加载更多了
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/easy_code/hyperf-devtool.git
git@gitee.com:easy_code/hyperf-devtool.git
easy_code
hyperf-devtool
hyperf-devtool
master

搜索帮助