dengpju / php-gen
v0.1.4
2024-09-12 07:20 UTC
Requires
- php: >=8.0
- ext-pcntl: *
- hyperf/command: v3.1.22
- hyperf/config: v3.1.27
- hyperf/constants: v3.1.27
- hyperf/crontab: v3.1.27
- hyperf/db-connection: v3.1.15
- hyperf/di: v3.1.15
- hyperf/framework: v3.1.23
- hyperf/http-server: v3.1.27
- hyperf/process: v3.1.27
- hyperf/validation: v3.1.27
- symfony/yaml: ^6.1
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.0
- mockery/mockery: ^1.0
- phpstan/phpstan: ^1.0
- phpunit/phpunit: >=7.0
- swoole/ide-helper: ^5.0
- symfony/var-dumper: ^4.2
Suggests
- swow/swow: Required to create swow components.
- dev-master
- v0.1.4
- v0.1.3
- v0.1.2
- v0.1.1
- v0.0.42
- v0.0.41
- v0.0.40
- v0.0.39
- v0.0.38
- v0.0.37
- v0.0.36
- v0.0.35
- v0.0.34
- v0.0.33
- v0.0.32
- v0.0.31
- v0.0.30
- v0.0.29
- v0.0.28
- v0.0.27
- v0.0.26
- v0.0.25
- v0.0.24
- v0.0.23
- v0.0.22
- v0.0.21
- v0.0.20
- v0.0.19
- v0.0.18
- v0.0.17
- v0.0.16
- v0.0.15
- v0.0.14
- v0.0.13
- v0.0.12
- v0.0.11
- v0.0.10
- v0.0.9
- v0.0.8
- v0.0.7
- v0.0.6
- v0.0.5
- v0.0.4
- v0.0.3
- v0.0.2
- v0.0.1
This package is auto-updated.
Last update: 2024-11-12 07:41:22 UTC
README
基于hyperf封装的devtool组件,支持构建Controller、Dao、Entity、Model、Enum、Service、Validate代码,查看Route列表
安装
composer require dengpju/php-gen
使用
生成[project_name]\config\autoload\gen.php配置
php bin/hyperf.php vendor:publish dengpju/php-gen
查看指令
php bin/hyperf.php
dengpju
dengpju:code Build Code. php bin/hyperf.php dengpju:code
dengpju:config Build Config Instance. php bin/hyperf.php dengpju:config
dengpju:controller Build Controller. php bin/hyperf.php dengpju:controller name=test path="Test"
dengpju:dao Build Dao. php bin/hyperf.php dengpju:dao model=all --conn=default --modelPath=Default Or php bin/hyperf.php dengpju:dao model=ModelName --conn=default --modelPath=Default
dengpju:entity Build Entity. php bin/hyperf.php dengpju:entity model=all --conn=default --modelPath=Default Or php bin/hyperf.php dengpju:entity model=ModelName --conn=default --modelPath=Default
dengpju:enum Build Enum. php bin/hyperf.php dengpju:enum conn=default name=yes_or_no flag='是否:yes-1-是,no-2-否'
dengpju:model Build Model. php bin/hyperf.php dengpju:model table=all --conn=default --prefix=fm_ --path=Default Or php bin/hyperf.php dengpju:model table=table-name --conn=default --prefix=fm_ --path=Default
dengpju:route Look Route List. php bin/hyperf.php dengpju:route server=http
dengpju:service Build Service. php bin/hyperf.php dengpju:service name=name path=path
dengpju:validate Build Validate. php bin/hyperf.php dengpju:validate name=name path=path
构建Controller
php bin/hyperf.php dengpju:controller name=test path="Test"
构建Dao
php bin/hyperf.php dengpju:dao model=all --conn=default --modelPath=Default
Or
php bin/hyperf.php dengpju:dao model=ModelName --conn=default --modelPath=Default
构建Entity
php bin/hyperf.php dengpju:entity model=all --conn=default --modelPath=Default
Or
php bin/hyperf.php dengpju:entity model=ModelName --conn=default --modelPath=Default
构建Model
php bin/hyperf.php dengpju:model table=all --conn=default --prefix=fm_ --path=Default
Or
php bin/hyperf.php dengpju:model table=table-name --conn=default --prefix=fm_ --path=Default
构建Service
php bin/hyperf.php dengpju:service name=name path=path
构建Validate
php bin/hyperf.php dengpju:validate name=name path=path
构建Enum
php bin/hyperf.php dengpju:enum conn=default name=yes_or_no flag='是否:yes-1-是,no-2-否'
构建Code
php bin/hyperf.php dengpju:code
查看Route列表
php bin/hyperf.php dengpju:route server=http