我有下面的代码来获得谁的客户谁的期限是今天结束。
$customers = CompanyModel::where(("term_ending") ,"=", "CURDATE()")->get();但是当我运行它时,它返回null。
与我在Mysql中运行的查询相同,它会给出结果。
select * from `companies` where `term_ending` = CURDATE()我做错了什么?
发布于 2016-08-08 16:04:28
我用碳解决了这个问题。
$customers =公司模型::where((“term_ending”),"=",Carbon::today())->get();
谢谢:)
https://stackoverflow.com/questions/38823604
复制相似问题