title: laravel eloquent query group by last id
body: <p>Hi I'm trying to get the last register in DB for each equipment</p>
  
  <p>I got like </p>
  
  <pre><code>id   | id_equip
  -----+----------
     1 |    3
     2 |    3
     3 |    3
     4 |    2
     5 |    2
  </code></pre>
  
  <p>I want to query like the last id of each equip like:</p>
  
  <pre><code>  id   | id_equip
    -----+----------
    3    |    3
    5    |    2
  </code></pre>
  
  <p>I tried this:</p>
  
  <pre><code>$calibracao = $this-&gt;calibracao-&gt;orderBy('id', 'DESC')-&gt;groupBy('id_equip')-&gt;get();
  </code></pre>
  
  <p>thanks for the help!</p>