I have a Vue component that prompts the user to enter their email address. I've utilized v-model
for data binding.
<template>
<input v-model="email" type="text" placeholder="Email" />
<button class="tiny">Send</button>
</template>
<script>
export default {
data: function () {
return {
email: ''
}
}
}
</script>
In my MailController
within Adonis, I need to be able to retrieve the user's inputted email address. This is what I imagine the code looking like:
'use strict';
class MailController {
*mail (request, response) {
const email = request.input('email');
}
}
What would be the correct approach to retrieve the value of email
?