加了时间条件为什么用模型查询出来是null 但是直接数据库查询有数据喃?
$change_time='2022-06-25 16:04:25';
$find = User::query()->where(['type' => 0, 'change_time' => $change_time ])->first();
dd($find);
打印结果是null
SQL
select * from `users` where (`type` = 0 and `change_time` = 2022-06-25 16:04:25) limit 1
直接数据库执行 就可以查询到数据 这个究竟出了什么问题呀
laravel版本?sql 是如何获得的?Carbon 函数如何处理就正常了?