📅  最后修改于: 2022-03-11 14:57:58.348000             🧑  作者: Mango
return $this->channels()
->leftJoin('replies', 'channels.id', '=', 'replies.channel_id')
->groupBy(['channels.id'])
->orderByRaw('max(replies.created_at) desc')
->get();