关于model查询结果字段名转化驼峰格式
thinkphp吧
全部回复
仅看楼主
level 1
凡人笑我太疯癫
楼主
比如 user_info 表有 user_id user_name 字段
$res = UserInfo::get(001); dump($res->toArray());
结果是
["USER_ID"] => string(3) "001"
["USER_NAME"] => string(3) "App"
thinkphp能不能在查询结果里把数据库字段名自动转化为驼峰格式的? 像 userId , userName
2018年11月22日 05点11分
1
1