Q:

How To Get The Sum Of All Fares

I'm using Laravel 5.7 & VueJs 2.5.* ... 
I want to get the sum of all fares in my TotalFares.  I was playing around but didn't get any success...
Here is my Fares <Input>:
<tr v-for="(ticketInvoiceItem, key) in form.ticketInvoiceItems" :key="key">
  <td>
    <input v-model.number="ticketInvoiceItem.fares" type="number" size="10" name="fares" class="table-control form-control" :class="{ 'is-invalid': form.errors.has('fares') }">
    <has-error :form="form" field="fares"></has-error>
  </td>
</tr>

Here is my TotalFares <input>:
<tfoot class="tfoot">
  <tr>
    <td class="table-amount">

      <input :value="getFareTotal()" type="text" name="ticket_invoice_fares_total" class="form-control" :class="{ 'is-invalid': form.errors.has('ticket_invoice_fares_total') }">

    </td>
  </tr>
</tfoot>

My data() in VueJs:
data() {
  return {
    ticketInvoices: {},
    vendors: null,
    form: new Form({
      id: "",
      vendor_id: "",
      ticket_invoice_no: "",
      ticket_invoice_date: "",
      ticket_invoice_fares_total: "",

      ticketInvoiceItems: [{
        id: "",
        ticket_invoice_id: "",
        passenger_name: "",
        fares: 0,
      }]
    })
  }
},

I tried to get FaresTotal something Like this but failed:
getFareTotal() {
  let calFareTotal =
    parseInt(this.form.ticketInvoiceItems[key].fares) +
    parseInt(this.form.ticketInvoice.ticket_invoice_fares_total);

  this.form.ticketInvoice.ticket_invoice_fares_total = calFareTotal;

  return calFareTotal;
},

A:

getFareTotal() {
  let sum = 0
  this.form.ticketInvoiceItems.forEach(i=> sum+=i.fares);
  console.log(sum)
}

ticketInvoiceItems is a collection.  So you have to iterate about it.