[Vuejs]-MySQL/Laravel/Vue -Can a single form input submit multiple values to multiple columns?

0๐Ÿ‘

โœ…

So if I understand you have an input in a vue component and want to use the input in two separate ways. How about:

<template>
  <input
  v-model="time"
  @change="makeEnergy"
  >
</template>
<script>
  data(){
    return {
      time:0,
      energy:0
    },
  methods: {
    makeEnergy() {
      this.energy = this.time/15
    }

</script>

Then you can post the two data elements as you like.

Leave a comment