`commentable_id`')
->where('content', 'like', 'Laravel学院%')
->where('commentable_type...`commentable_id`')
->where('content', 'like', 'Laravel学院%')
->where('commentable_type...('title', 'like', 'Laravel学院%');
})->whereHas('posts.comments', function ($query) {
$query->where...query) {
$query->where('title', 'like', 'Laravel学院%');
})->orWhereHas('posts.comments', function...,则不推荐使用,毕竟是要执行多次查询才能逐个统计出来。