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