if (isset($data['txnTimeStart']) && !empty($data['txnTimeStart'])) {
//['r.txnTime','>=',$data['txnTimeStart']];
$where[] = [function(Builder $builder)use($data){
$builder->whereRaw("DATE_FORMAT(r.txnTime,'%Y-%m-%d') >= {$data['txnTimeStart']}");
}];
}
标签:laravel,function,where,builder,txnTimeStart,data
From: https://www.cnblogs.com/ianlab/p/17058485.html