Hi, I have a question about how to pass the Token to my Dropzone.
I usually did it from a laravel view. Adding Js. in herself. And there was no problem.
var myDropZone = new Dropzone('.dropzone',{
url: '/admin/posts/{{$post->url}}/photos',
paramName:'photo',
acceptedFiles:'image/*',
maxFilesSize: 2,
maxFiles: 10,//
dictDefaultMessage:'Arrastra las fotos aqui para subirlas',
headers:{
'X-CSRF-TOKEN':'{{ csrf_token()}}'
}
});
but now, I'm with Vue. that was the one that unloaded.
npm install vue2-dropzone
but what happens is that where I'm trying to load an image, I'm from a Vue component.
And I do not know how to pass that token to the component. ... I'm doing a SPA