FastAdmin 的 CRUD 不支持层级模型

FastAdmin  的 CRUD 可以快速生成控制器,模型和前端文件。

群里有人试了这个命令:

php think crud -t departmant -c auth/departmant -m auth/departmant

但是生成的 model 没有首字大写。

查了 Crud 主程序,发现原来 CRUD 是不是支持层级 model 的。

//模型默认以表名进行处理,以下划线进行分隔,如果需要自定义则需要传入model,不支持目录层级
        $modelName = $this->getModelName($model, $table);
        $modelFile = ($local ? $adminPath : APP_PATH . 'common' . DS) . 'model' . DS . $modelName . '.php';
原文地址:https://www.cnblogs.com/F4NNIU/p/8065688.html