title: How to do this in Laravel, subquery where in update
body: <p>How can I make this query in Laravel 5.2:</p>
  
  <pre><code>UPDATE product p
      SET price = ( SELECT price FROM product_price WHERE product_id = p.id AND price &gt; 0 AND inventory &gt; 0 AND active = 1 ORDER BY price desc limit 1)
      SET discounts = ( SELECT discount FROM product_price WHERE product_id = p.id AND price &gt; 0 AND inventory &gt; 0 AND active = 1 ORDER BY price desc limit 1)
      WHERE
      product_state = 1
  </code></pre>
  
  <p>how can I run this with db?</p>