subquery with update laravel
<p>I write simple query in mysql </p>

<pre><code> update cart set cart_price=(select sum(total_price) from cart_items where cart_id=9) where cart_id=9
</code></pre>

<p>I want to implement the same thing using Laravel elequent. How can I do that ? </p>

<p>Thanks. </p>