$cateInfo = model('Songcate')->with('song,song.comment')->find($id); foreach ($cateInfo['song'] as $v) { $v->together('comment')->delete(); } $res = $cateInfo->together('song')->delete();
tp5 关联删除
猜你喜欢
转载自www.cnblogs.com/zhangcheng001/p/13371487.html
今日推荐
周排行