title: How to do this query with Laravel query builder
body: <p>I'm trying to run this query in Laravel, and would like to do it with the query builder, so I can use the paginate() method. But I can't seem to figure out how to get this subquery going.</p>
  
  <p>The raw query is:</p>
  
  <pre><code>SELECT *
  FROM (
  SELECT *
  FROM `order_history`
  WHERE `customer_id` = '05033'
  AND `part_number` LIKE 'M%'
  ORDER BY `shippingdate` DESC) history
  GROUP BY `part_number`
  </code></pre>
  
  <p>Thanks in advance!</p>