使用ORM模型查询数据
查询语句:
AccessList::where('date','=',$date)
->where('start_time',$start_time)
->where('end_time',$end_time)
->whereIn('state',['1','2'])
->count();
推荐文章: