Hi, at the moment if I send an axios post trb to refresh the page so I can see the data.
How can I do it in the best way possible so as not to refresh the page when posting data?
I don't use it in a form, I have a button after which I put a value.
Don't know what your controller is returning, but you simply need to assign the response of it to your data:
data () {
return {
data: []
}
},
methods: {
add (id) {
axios.post('add/' + id)
.then((response) => {
this.data = response // if your actual data is somehwat wrapped, make sure you do the same here
})
},
}