think\db\Raw could not be converted to string 错误的处理方式
我使用的是thinkphp 8.0.2 版本,在分页查询使用fileld出现提示think\db\Raw could not be converted to string的问题。
解决方案为,在文件vendor\topthink\think-orm\src\db\Raw中重写tostring即可。
public function __toString()
{
return (string) $this->value;
}

浙公网安备 33010602011771号