7
您如何用Eloquent检查“ if not null”?
您如何使用Eloquent 检查字段是否不为null? 我试过了,Model::where('sent_at', 'IS NOT', DB::raw('null'))->...但它给出的IS NOT是绑定而不是比较。 就是这样DB::getQueryLog()说的: 'query' => string 'select * from my_table where sent_at = ? and profile_id in (?, ?) order by created_at desc' (length=101) 'bindings' => array (size=3) 0 => string 'IS NOT' (length=6) 1 => int 1 2 => int 4