Laravel在哪里和哪里

Cha*_*dra 2 laravel

我正在使用laravel 5.4,我需要立即检查事件和创建日期条件.所以我使用了以下代码,

  protected $table = 'qlog';   
        public $timestamps = false;

        public function getAbondonedCalls(){

        $results =  DB::table('qlog')
            ->whereDate('created', '=', DB::raw('curdate()'))
            ->where('event', '=', 'ABANDON')
            ->get();  

             var_dump($results);
            die(); 

}   
Run Code Online (Sandbox Code Playgroud)

但是这段代码什么都没有.删除此行后,它返回一条记录.

 ->whereDate('created', '=', DB::raw('curdate()'))
Run Code Online (Sandbox Code Playgroud)

如何添加这两个条件?

Add*_*Ltd 13

你应该试试这个:

->whereDate('created', '=', date('Y-m-d'))
Run Code Online (Sandbox Code Playgroud)