Laravel 如何查询 MySQL 的时候指定类型呢?
由于不知道原因导致了id的类型是chat存的 laravel会把id转成int去查询,我强行指定string也是没生效 有大神指导吗?
这是mysql的日志:
select count(*) as aggregate from `posts` where (`is_show` = 1) and (`user_id` = 12798253142245376) and `posts`.`deleted_at` is null;
想转成下面的格式
select count(*) as aggregate from `posts` where (`is_show` = 1) and (`user_id` = '12798253142245376') and `posts`.`deleted_at` is null;
修改器也使用过
推荐文章: