$where = function ($query) use ($map1, $map2) { $query->whereOr(function ($query) use ($map1) { $query->where($map1); })->whereOr(function ($query) use ($map2) { $query->where($map2); }); };
使用闭包查询