hyperf icon indicating copy to clipboard operation
hyperf copied to clipboard

CLI 命令生成模型表疑问

Open MichonneHsu opened this issue 3 years ago • 1 comments

大佬,为什么我执行php bin/hyperf.php gen:model order_products 这后 是读取 products这个表? 换个名字执行php bin/hyperf.php gen:model order_order_products,却能匹配得上,奇怪了 我有配置前缀order_?

MichonneHsu avatar Jun 11 '22 02:06 MichonneHsu

可以检查一下 .env 文件中有没有配置 DB_PREFIX,如果没有就再检查一下 config/autoload/databases.php 中没有配置 prefix。

her-cat avatar Jun 21 '22 06:06 her-cat