如果有遇到model查询出来的字段原本应该为整型才对,结果是字符串,怎么办
在model类里面添加类似于如下代码即可
protected $type = [
'field' => 'integer'//integer 为数据类型
];
12阅读 0条评论
如果有遇到model查询出来的字段原本应该为整型才对,结果是字符串,怎么办
在model类里面添加类似于如下代码即可
protected $type = [
'field' => 'integer'//integer 为数据类型
];
WANYL