0
这不显示正确的计数。什么是正确的语法?Laravel - 小于/大于日期语法
$this->data['Tasks'] = \DB::table('tb_tasks')->where('Status', 'like', 'Open%')->whereDate('DeadLine', '>', 'CURDATE()')->count();
这不显示正确的计数。什么是正确的语法?Laravel - 小于/大于日期语法
$this->data['Tasks'] = \DB::table('tb_tasks')->where('Status', 'like', 'Open%')->whereDate('DeadLine', '>', 'CURDATE()')->count();
使用碳例如:
$this->data['Tasks'] = \DB::table('tb_tasks')->where('Status', 'like', 'Open%')->whereDate('DeadLine', '>', Carbon::now())->count();
非常感谢。计数值现在是正确的。 – Selim
的[Laravel雄辩的比较从时间字段日期]可能的复制(http://stackoverflow.com/questions/25139948/laravel-eloquent-compare-date -from-datetime-field) – manniL