0
I’m wanting to delete a record, but when accessing the route of the Laravel using the this. $http.delete gives me the error 419 Unknown status
Lockable method
public function destroy(Request $request){
return User::destroy($request['id']);
}
Route:
Route::delete('user/delete/{id}', 'Admin\UserAccessController@destroy');
Vue:
deleteUser: function(id){
this.$http.delete(this.$root.baseUrl + 'user/delete/'+id).then((response) => {
if (response == 1) {
this.users = this.deleteFromArray(this.users,id);
this.$root.$refs.toastr.s('Usuário deletado com sucesso!');
} else {
this.$root.$refs.toastr.e('Não foi possível deletar o usuário!');
}
}).catch(function(e) {
console.log(e);
this.$root.$refs.toastr.e('Ocorreu um erro ao deletar usuário!');
});
},
Does anyone know what it can be?