dump(UserModel::with(['department'=>['name']])->select());浏览器返回提示:Missing argument 1 for think\db\Query::name()[2] ErrorException in Query.php line 157
Missing argument 1 for think\db\Query::name()哪里有问题?求指教测试了下:
dump(UserModel::with(['department')->select()); //正常
dump(UserModel::with(['department, comment')->select()); //正常
dump(UserModel::with(['department.name')->select()); //出错Missing argument 1 for think\db\Query::name()
dump(UserModel::with(['department'=>['name']])->select());//出错Missing argument 1 for think\db\Query::name()开发手册中留了一手吗? 最佳答案