title: Getting sum of elements in a table using vuejs and laravel
body: <p>I am using vuejs and laravel and I want to get total amount in a table which contains quantity, unit price and their totals. Now I want to get their total after looping the database elements and using v-if to get certain elements. How do I do this...thanks in advance. 
  <a href="https://i.stack.imgur.com/1gW4G.png" rel="nofollow noreferrer">this is the view</a></p>
  
  <p>This is my code</p>
  
  <pre><code> &lt;table id="example1" class="table table-bordered table-striped table-hover"&gt;
            &lt;thead&gt;
              &lt;th&gt;Decription&lt;/th&gt;
              &lt;th&gt;Quantity&lt;/th&gt;
              &lt;th&gt;Unit price&lt;/th&gt;
              &lt;th&gt;Total&lt;/th&gt;
              &lt;th&gt;Create on&lt;/th&gt;
            &lt;/thead&gt;
            &lt;tbody&gt;
              &lt;tr v-for="item, key in pass" v-if="list.quotation_no === item.quotation_id"&gt;
                &lt;td&gt;{{ item.description }}&lt;/td&gt;
                &lt;td&gt;{{ item.quantity }}&lt;/td&gt;
                &lt;td&gt;{{ item.unit_price }}&lt;/td&gt;                  
                &lt;td&gt;{{ item.quantity * item.unit_price }}&lt;/td&gt;
                &lt;td&gt;{{ item.created_at }}&lt;/td&gt;&lt;br&gt;
              &lt;/tr&gt;     
            &lt;/tbody&gt;
          &lt;/table&gt;
  </code></pre>