$comment = Comment::all();
foreach ($comment as $key => $post_id) { //foreign
$key;//как узнать самое большое количество одинаковых id?
$post = Post::find(?);
Post::leftJoin('comments', 'comments.post_id', '=', 'posts.id')
->groupBy('posts.id')
->orderBy('comments_cnt', 'desc')
->select(\DB::raw("count(comments.id) as comments_cnt"))
->get();