command.html 4.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. <form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="" style="display: none">
  2. <!--代码输入框(注意请务必设置高度,否则无法显示)-->
  3. <pre id="code" class="ace_editor" style="min-height: calc(100vh - 30px);margin-bottom: 0px;">
  4. <textarea name="code11" class="ace_text-input">
  5. *************************使用说明***************************
  6. 1.每行为一个独立的命令
  7. 2.输入命令后按回车执行
  8. 3.必须是php think开始且前面不能有空白或其他字符
  9. 4.底部的按钮点击可查看对应的常用命令集合
  10. *************************使用说明***************************
  11. </textarea>
  12. </pre>
  13. <div class="form-group layer-footer" style="margin-bottom:0;">
  14. <div class="col-xs-12 col-sm-8" style="text-align: left;width: 100%;padding-left:20px;">
  15. <button type="button" class="btn btn-success btn-embossed" data-val="crud">{:__('CRUD命令')}</button>
  16. <button type="button" class="btn btn-success btn-embossed" data-val="menu">{:__('菜单命令')}</button>
  17. <button type="button" class="btn btn-success btn-embossed" data-val="min">{:__('压缩打包命令')}</button>
  18. <button type="button" class="btn btn-success btn-embossed" data-val="api">{:__('生成API文档命令')}</button>
  19. </div>
  20. </div>
  21. </form>
  22. <p id="crud" style="display: none">
  23. //生成fa_test表的CRUD
  24. php think crud -t test
  25. //生成fa_test表的CRUD且一键生成菜单
  26. php think crud -t test -u 1
  27. //删除fa_test表生成的CRUD
  28. php think crud -t test -d 1
  29. //生成fa_test表的CRUD且控制器生成在二级目录下
  30. php think crud -t test -c mydir/test
  31. //生成fa_test_log表的CRUD且生成对应的控制器为testlog
  32. php think crud -t test_log -c testlog
  33. //生成fa_test表的CRUD且对应的模型名为testmodel
  34. php think crud -t test -m testmodel
  35. //生成fa_test表的CRUD且生成关联模型category,外链为category_id,关联表主键为id
  36. php think crud -t test -r category -k category_id -p id
  37. //生成fa_test表的CRUD且所有以list或data结尾的字段都生成复选框
  38. php think crud -t test --setcheckboxsuffix=list --setcheckboxsuffix=data
  39. //生成fa_test表的CRUD且所有以image和img结尾的字段都生成图片上传组件
  40. php think crud -t test --imagefield=image --imagefield=img
  41. //关联多个表,参数传递时请按顺序依次传递,支持以下几个参数relation/relationmodel/relationforeignkey/relationprimarykey/relationfields/relationmode
  42. php think crud -t test --relation=category --relation=admin --relationforeignkey=category_id --relationforeignkey=admin_id
  43. //生成v_phealth_db2数据库下的fa_test表的CRUD
  44. php think crud -t test --db=v_phealth_db2
  45. </p>
  46. <p id="menu" style="display: none">
  47. //一键生成test控制器的权限菜单
  48. php think menu -c test
  49. //一键生成mydir/test控制器的权限菜单
  50. php think menu -c mydir/test
  51. //删除test控制器生成的菜单
  52. php think menu -c test -d 1
  53. //一键全部重新所有控制器的权限菜单
  54. php think menu -c all-controller
  55. </p>
  56. <p id="min" style="display: none">
  57. //一键压缩打包前后台的JS和CSS
  58. php think min -m all -r all
  59. //一键压缩打包后台的JS和CSS
  60. php think min -m backend -r all
  61. //一键压缩打包前后台的JS
  62. php think min -m all -r js
  63. //一键压缩打包后台的CSS
  64. php think min -m backend -r css
  65. </p>
  66. <p id="api" style="display: none">
  67. //一键生成API文档
  68. php think api --force=true
  69. //指定https://www.example.com为API接口请求域名,默认为空
  70. php think api -u https://www.example.com --force=true
  71. //输出自定义文件为myapi.html,默认为api.html
  72. php think api -o myapi.html --force=true
  73. //修改API模板为mytemplate.html,默认为index.html
  74. php think api -e mytemplate.html --force=true
  75. //修改标题为FastAdmin,作者为作者
  76. php think api -t FastAdmin -a Karson --force=true
  77. //查看API接口命令行帮助
  78. php think api -h
  79. </p>