Problems when accessing route in laravel to delete using Vue.js

0

I'm trying to delete a record, but when I access the laravel route using this

asked by anonymous 19.12.2017 / 14:29

1 answer

0

You need to put a header.It's like this:

this.$http.delete(this.$root.baseUrl + 'user/delete/'+id,{headers:{
            'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
        }})
    
20.12.2017 / 14:11