title: Trying to sort comment by the newest sub comment - Laravel
body: <p>I'm trying to sort by the newest messages first, including the sub-messages. For example, if someone adds a sub-comment to an old message at the bottom, it would be moved to the top.</p>
  <p>Here is the code I'm using:</p>
  <pre><code>$comments = Comment::where('discussion_id' , $info['id'])-&gt;where('parent_id', 0)-&gt;orderby('id' , 'desc')-&gt;paginate(6);
  </code></pre>
  <p>if parent_id is 0, it is not a sub-comment.</p>