thinkphp6问题以及解决方法持续更新
2022-11-24 11:10:29
165
{{single.collect_count}}

1:find查询

thinkpph6使用find()查询当无条件的时候,会返回null,解决办法

2: 数据库查询出来的数据转数组->toArray()报错解决

"name": "think\\exception\\ErrorException","file": "E:\\Program Files\\wamp\\www\\shouyaodev\\vendor\\topthink\\think-orm\\src\\model\\concern\\TimeStamp.php",

这个是数据库字段返回包含create_time且是时间戳,解决办法,要么这个字段mysql查询返回转日期,要么重命名 

回帖
全部回帖({{commentCount}})
{{item.user.nickname}} {{item.user.group_title}} {{item.friend_time}}
{{item.content}}
{{item.comment_content_show ? '取消' : '回复'}} 删除
回帖
{{reply.user.nickname}} {{reply.user.group_title}} {{reply.friend_time}}
{{reply.content}}
{{reply.comment_content_show ? '取消' : '回复'}} 删除
回帖
收起
没有更多啦~
{{commentLoading ? '加载中...' : '查看更多评论'}}