title: Laravel show last reply left on post
body: <p>I'm trying to show the last reply that was left on a post. But only the name and date of it. I tried the following things</p>
  
  <p>What I think this one should do is look at the replies to the post. Sort them by ID and then display the first one's username. But it doesn't work.
  <code>$topic-&gt;replies-&gt;sortBydesc('id')-&gt;first()-&gt;user-&gt;username }}</code></p>
  
  <p>I also tried this one where I requested all the replies in the entire forum and displayed the last one. It worked but I wasn't the one related to the post.
  <code>{{ $allposts-&gt;sortBydesc('id')-&gt;first()-&gt;user-&gt;username }}</code></p>
  
  <p>Does anyone know how I can make this work?
  Currently, i'm passing these two into the view (There is nothing wrong with these, they work but I think there should be something added)</p>
  
  <pre><code>public function show($id)
  {
  
  
      $topics = Topic::with('theme')-&gt;find($id);
      $theme = Theme::with('topics')-&gt;find($id);
  
      return view('themes.theme')-&gt;with('topics', $topics)-&gt;with('theme', $theme);
  }
  </code></pre>
  
  <p>Thanks in advance</p>