title: selecting last row for every id in Laravel's Eloquent
body: <p>I have a history of every rental of a book from the library and based on that I want to show current status of ALL BOOKS in the library. If I have only id, book_id, status (bool), and timestamps how should I do it in the easiest way without touching SQL? I want to have the freshest record for every book_id for example:</p>
  
  <pre><code>|--|-------|------|----------|
  |id|book_id|status|timestamp-|
  |--|-------|------|----------|
  | 1|      1|     0|12.12.2019|
  | 2|      2|     0|13.12.2019|
  | 3|      3|     0|14.12.2019|
  | 4|      2|     1|15.12.2019|
  | 5|      3|     1|16.12.2019|
  | 6|      3|     0|17.12.2019|
  |--|-------|------|----------|
  </code></pre>
  
  <p>and I want to get this:</p>
  
  <pre><code>|--|-------|------|----------|
  |id|book_id|status|timestamp-|
  |--|-------|------|----------|
  | 1|      1|     0|12.12.2019|
  | 4|      2|     1|15.12.2019|
  | 6|      3|     0|17.12.2019|
  |--|-------|------|----------|
  </code></pre>
  
  <p>Ideas?</p>