For example
To implement data query within a month
Then you should use between to calculate the time. How does laravel's ORM implement the between operation
$start = '开始时间';
$end = '结束时间';
$map['time'] = array('between' , array($start , $end));
User::where($map)->get();
The above code is invalid
phpcn_u15822017-05-16 16:49:21
User::whereBetween('created_at', [$start, $end]);
//or
User::where('created_at', '>=', $start)->where('created_at', '<=', $end);
高洛峰2017-05-16 16:49:21
$obj=Condition 1;
$obg=$obj->where();
$obg=$obj->where();
Just use this method