$where = function (Query $query) use(&$data) {
if (isset($data['soot_status']) and !empty($data['soot_status'])) {
$query->where('m1.soot_status', $data['soot_status']);
}
$query->where("equipment_status != 5");
};
以后这样写where 不要where 1 = 1 拼接的写法