Update CURD.md
This commit is contained in:
20
CURD.md
20
CURD.md
@@ -6,34 +6,34 @@
|
||||
# 常用命令
|
||||
|
||||
```shell
|
||||
# 生成ea_test_goods表的CURD
|
||||
# 生成ea8_test_goods表的CURD
|
||||
php think curd -t test_goods
|
||||
|
||||
# 生成ea_test_goods表的CURD, 文件冲突时强制覆盖
|
||||
# 生成ea8_test_goods表的CURD, 文件冲突时强制覆盖
|
||||
php think curd -t test_goods -f 1
|
||||
|
||||
# 删除ea_test_goods表的CURD
|
||||
# 删除ea8_test_goods表的CURD
|
||||
php think curd -t test_goods -d 1
|
||||
|
||||
# 生成ea_test_goods表的CURD, 控制器在目录demo下的Goods.php文件
|
||||
# 生成ea8_test_goods表的CURD, 控制器在目录demo下的Goods.php文件
|
||||
php think curd -t test_goods -c demo/Goods
|
||||
|
||||
# 生成ea_test_goods表的CURD, 模型在目录demo下的Goods.php文件
|
||||
# 生成ea8_test_goods表的CURD, 模型在目录demo下的Goods.php文件
|
||||
php think curd -t test_goods -m demo/Goods
|
||||
|
||||
# 生成ea_test_goods表的CURD, 并关联ea_test_cate表, 并设置外键为cate_id
|
||||
# 生成ea8_test_goods表的CURD, 并关联ea8_test_cate表, 并设置外键为cate_id
|
||||
php think curd -t test_goods -r test_cate --foreignKey=cate_id --primaryKey=id
|
||||
|
||||
# 生成ea_test_goods表的CURD, 并关联ea_test_cate表, 并设置只显示title,image两个字段
|
||||
# 生成ea8_test_goods表的CURD, 并关联ea8_test_cate表, 并设置只显示title,image两个字段
|
||||
php think curd -t test_goods -r test_cate --foreignKey=cate_id --relationOnlyFileds=title,image
|
||||
|
||||
# 生成ea_test_goods表的CURD, 并关联ea_test_cate表, 并设置主表外键cate_id在表单的下拉选择显示的关联表的title字段
|
||||
# 生成ea8_test_goods表的CURD, 并关联ea8_test_cate表, 并设置主表外键cate_id在表单的下拉选择显示的关联表的title字段
|
||||
php think curd -t test_goods -r test_cate --foreignKey=cate_id --relationBindSelect=title
|
||||
|
||||
# 生成ea_test_goods表的CURD, 并设置logo字段后缀为单图片
|
||||
# 生成ea8_test_goods表的CURD, 并设置logo字段后缀为单图片
|
||||
php think curd -t test_goods --imageFieldSuffix=logo
|
||||
|
||||
# 生成ea_test_goods表的CURD, 并设置忽略remark, stock字段
|
||||
# 生成ea8_test_goods表的CURD, 并设置忽略remark, stock字段
|
||||
php think curd -t test_goods --ignoreFields=remark --ignoreFields=stock
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user