thinkph5 新增命令/添加命令command
原创
©著作权归作者所有:来自51CTO博客作者廖圣平_的原创作品,请联系作者获取转载授权,否则将追究法律责任
在根目录下执行
php think make:command 你的命令名称
其他的命令,可以在更目录下执行 php think,即可查看更多
Think Console version 0.1
Usage:
command [options] [arguments]
Options:
-h, --help Display this help message
-V, --version Display this console version
-q, --quiet Do not output any message
--ansi Force ANSI output
--no-ansi Disable ANSI output
-n, --no-interaction Do not ask any interactive question
-v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
Available commands:
build Build Application Dirs
clear Clear runtime file
help Displays help for a command
list Lists commands
run PHP Built-in Server for ThinkPHP
version show thinkphp framework version
make
make:command Create a new command class
make:controller Create a new resource controller class
make:middleware Create a new middleware class
make:model Create a new model class
make:validate Create a validate class
optimize
optimize:autoload Optimizes PSR0 and PSR4 packages to be loaded with classmaps too, good for production.
optimize:config Build config and common file cache.
optimize:route Build route cache.
optimize:schema Build database schema cache.
route
route:list show route list.