$val){ $foot_where = []; $foot_where[] = ['pipe_type', '=', 'article']; $foot_where[] = ['pipe_id', '=', $val['id']]; $alltime = Footprints::where($foot_where)->count(); if(!empty($alltime)) $all[] = ['id'=>$val['id'],'view_times'=>$alltime]; } $mod = new Article; $mod->saveAll($all); } } ?>