fastadmin常用一键创建curd


//生成fa_test表的CRUD且一键生成菜单
php think crud -t test -u 1


//删除fa_test表生成的CRUD
php think crud -t test -d 1


//生成fa_test表的CRUD且生成关联模型category,外链为category_id,关联表主键为id
php think crud -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 --imagefield=img


//关联多个表,参数传递时请按顺序依次传递,支持以下几个参数relation/relationmodel/relationforeignkey/relationprimarykey/relationfields/relationmode
php think crud -t test --relation=category --relation=admin --relationforeignkey=category_id --relationforeignkey=admin_id






------------创建curd 并且关联多表 且后缀img的生成上传图
php think crud -t fa_project  -u 1  --imagefield=img --relation=fa_project_cat --relation=fa_country --relationforeignkey=category_id --relationforeignkey=country_id

原文地址:https://www.cnblogs.com/gyrgyr/p/15737261.html