标签:过滤 limit one 数据 chunk sel condition conf ber
//贪婪模式闭包过滤
$orders = MemberLevelOrder::with(['hasOneOrderGoods'=>function($query){
return $query->where('goods_id',config('custom.goods_id'));
}])->where($condition)->limit(2000)->chunk(500, function ($coll) {
self::setGrowing($coll);
});
laravel 使用with查询数据和 chunk分块的使用
标签:过滤 limit one 数据 chunk sel condition conf ber
原文地址:https://www.cnblogs.com/photo520/p/11804132.html