有没有办法迭代按select语句分组的组?
$bidsInPeriod = DB::table('bids')
->select('bundle_id','owner_id','target','bid', DB::raw('count(*) as total'))
->where('submit_time','<',$i)
->whereRaw('? + run_time < deadline_time', array($i-3600))
->where('owner_id',$this->userId)
->where('status',0)
->groupBy('bundle_id')->get();
foreach($bidsInPeriod as $bundle){
$tmpBundle=new bundle($bundle['bundle_id'],$bundle['bid']);
$bidRecords=bidsM::where('bundle_id','=',$i)->get();
foreach($bidRecords as $bid){
$tmpBundle->addBid($bid);
}