I have two components:
Header.vue:
<button type="submit" @click="clickNext">Next</button>
methods:{
clickNext(){
Bus.$emit('submitForm');
}
}
And Home.vue
<form method="POST" ref="my-form">
<input type="text" name="email" id="email" />
</form>
created() {
Bus.$on('submitForm', () => this.$refs['my-form'].submit(this.send()))
},
methods: {
send() {
console.log("send!");
}
}
I need send form (with component Home.vue) using button which is in Header.vue component. When I click Next button Laravel REFRESH PAGE and return error:
Symfony \ Component \ HttpKernel \ Exception \ MethodNotAllowedHttpException
No message