多应用+插件架构,代码干净,二开方便,首家独创一键云编译技术,文档视频完善,免费商用码云13.8K 广告
#### 命令参数介绍: //生成fa_test表的CRUD -t test //生成fa_test表的CRUD且一键生成菜单 -t test -u 1 //删除fa_test表生成的CRUD -t test -d 1 //生成test表的CRUD且控制器生成在二级目录下 -t test -c mydir/test(不成功,没有参数不成功,mydir/test没有定义) //生成test_log表fa_test_log表的CRUD且生成对应的控制器为testlog -t test -c testlog //生成fa_test表的crud且对应的模型名为testmodel -t test -m testmodel //生成fa_test表的crud且生成关联模型category,外链为category_id,关联表主键为id -t test -r category -k category_id -p id //生成fa_test表的CRUD且所有以list或data结尾的字段都生成复选框 php think crud -t test --setcheckboxsuffix=list --setcheckboxsuffix=data //生成fa_test表的CRUD且所有以image和img结尾的字段都生成图片上传组件 php think crud -t test --imagefield=image --setcheckboxsuffix=img -t, --table=TABLE table name without prefix表名,带不带前缀均可 -c, --controller[=CONTROLLER] controller name生成的控制器名,可选,默认根据表名进行自动解析 -m, --model[=MODEL] model name模型名称 -i, --fields[=FIELDS] model visible fields模型可见字段 -f, --force[=FORCE] force override or force delete,without tips不使用提示,强制覆盖或强制删除 -l, --local[=LOCAL] local model [default: 1]本地模式,默认值为1 -r, --relation[=RELATION] relation table name without prefix (multiple values allowed)没有前缀的关系表名(允许多个值) -e, --relationmodel[=RELATIONMODEL] relation model name (multiple values allowed)关系模型的名称(允许多个值) -k, --relationforeignkey[=RELATIONFOREIGNKEY] relation foreign key (multiple values allowed)外键的关系(允许多个值) -p, --relationprimarykey[=RELATIONPRIMARYKEY] relation primary key (multiple values allowed)主键的关系(允许多个值) -s, --relationfields[=RELATIONFIELDS] relation table fields (multiple values allowed)关系表字段(允许多个值) -o, --relationmode[=RELATIONMODE] relation table mode,hasone or belongsto (multiple values allowed)关系表模式hasOne或beLongsTo(允许多个值) -d, --delete[=DELETE] delete all files generated by CRUD删除CRUD生成的所有文件 -u, --menu[=MENU] create menu when CRUD completed档CRUD完成时创建菜单 --setcheckboxsuffix[=SETCHECKBOXSUFFIX] automatically generate checkbox component with suffix (multiple values allowed)自动生成带有后缀的复选框的组件(允许多个值) --enumradiosuffix[=ENUMRADIOSUFFIX] automatically generate radio component with suffix (multiple values allowed)自动生成带有后缀的单选框组件(允许多个值) --imagefield[=IMAGEFIELD] automatically generate image component with suffix (multiple values allowed)自动生成带有后缀的图像组件(允许多个值) --filefield[=FILEFIELD] automatically generate file component with suffix (multiple values allowed)自动生成带有后缀的文件组件(允许多个值) --intdatesuffix[=INTDATESUFFIX] automatically generate date component with suffix (multiple values allowed)自动生成带有后缀的时间组件(允许多个值) --switchsuffix[=SWITCHSUFFIX] automatically generate switch component with suffix (multiple values allowed)自动生成带有后缀的开关组件 --citysuffix[=CITYSUFFIX] automatically generate citypicker component with suffix (multiple values allowed)自动生成带有后缀的citypicker(选择器)组件(允许多个值) --selectpagesuffix[=SELECTPAGESUFFIX] automatically generate selectpage component with suffix (multiple values allowed)自动生成带有后缀的下拉分页组件(允许多个值) --selectpagessuffix[=SELECTPAGESSUFFIX] automatically generate multiple selectpage component with suffix (multiple values allowed)自动生成带有后缀的多个下拉组件(允许多个值) --ignorefields[=IGNOREFIELDS] ignore fields (multiple values allowed)排除的字段(允许多个值) --sortfield[=SORTFIELD] sort field 字段排序 --editorclass[=EDITORCLASS] automatically generate editor class自动生成编辑器类 -h, --help Display this help message显示帮助信息 -V, --version Display this console version显示控制台版本 -q, --quiet Do not output any message不输出任何消息 --ansi Force ANSI output强制ANSI输出 --no-ansi Disable ANSI output屏蔽ANSI -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增加消息的详情(1表示正常输出,2表示更详细的输出,3表示调试命令)