0👍
Inside of your method deleteRecord:
this.$http.delete(url)
.success(function(response) {
console.log(response)
})
.error(function(errors) {
console.log(error)
});
Or using axios inside of your method
axios.delete(url)
.then(function (response) {
console.log(response);
})
.catch(function (error) {
console.log(error);
});
- [Vuejs]-ES6 Vue and Webpack project doesn't run on IE11 but works on Chrome
- [Vuejs]-How to autogenerate name using first name and last name using quasar
0👍
I get it now. I’ll just post it here to help others also.
deleteRecord: function(id) {
var url = "projects" + "/" + id;
$.ajax({
url: url,
type: 'DELETE',
data: { "_token": "{{ csrf_token() }}" },
success: function(response) {
//do some success stuff here..
}
});
}
- [Vuejs]-How to get values from a template with slot and slot-scope in Vue?
- [Vuejs]-Vue update object based on checkbox checked list of objects?
Source:stackexchange.com