title: Getting just the latest value on a joined table with Eloquent
body: <p>I have two tables like this:</p>
  
  <p><strong>products:</strong></p>
  
  <pre><code>+----+-----------+
  | id |   name    |
  +----+-----------+
  |  1 | Product 1 |
  |  2 | Product 2 |
  |  3 | Product 3 |
  |  4 | Product 4 |
  +----+-----------+
  </code></pre>
  
  <p><strong>prices:</strong></p>
  
  <pre><code>+----+-------+------------+---------------------+
  | id | price | product_id |     created_at      |
  +----+-------+------------+---------------------+
  |  1 |    20 |          1 | 2014-06-21 16:00:00 |
  |  2 |    10 |          1 | 2014-06-21 17:00:00 |
  |  3 |    50 |          2 | 2014-06-21 18:00:00 |
  |  4 |    40 |          2 | 2014-06-21 19:00:00 |
  +----+-------+------------+---------------------+
  </code></pre>
  
  <p>I have this relationship on Product:</p>
  
  <pre><code>public function prices()
  {
      return $this-&gt;hasMany('Price');
  }
  </code></pre>
  
  <p>I can easily run <code>Product::with('prices')-&gt;get();</code> to get each product with each of the prices it's had.</p>
  
  <p>How can I use Eloquent to only get the most recent price? (Also, what if I wanted the cheapest/most expensive price instead?)</p>