title: How to get Total Sum of one column after multipling with other column values
body: <p><a href="https://i.stack.imgur.com/Sa7Cc.png" rel="nofollow noreferrer">take a look at this Database screenshot</a></p>
  
  <p>There are two different columns, i want to multiply column "Purchase" value with Column "Stock". and then want to Sum of all answers. As per example, first row answer is 6600 and second row answer is 4500, i want total after multiplication and sum. </p>
  
  <p>Tried this code: but getting 0 as result.</p>
  
  <pre><code>$purchase_sum = Stock::All()-&gt;sum('purchase' * 'stock');
  </code></pre>
  
  <p>Using Laravel eloquent method.</p>
  
  <p>Thanks in advance </p>