使用with查询数据

//贪婪模式闭包过滤
        $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);
        });

相关文章:

  • 2022-01-22
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-18
  • 2021-11-09
  • 2021-10-16
猜你喜欢
  • 2021-11-22
  • 2022-12-23
  • 2022-12-23
  • 2021-10-21
  • 2021-12-10
  • 2022-12-23
  • 2021-05-12
相关资源
相似解决方案