body not working ? part 2
icangku opened this issue · 10 comments
how to access this in body options ?
body : { reviewId : this.review},
it doesn't work
i got undefined
when i'm trying to see what's the value of reviewId in my server it gave 'undefined'
I'm using Laravel like this :
dd($request->reviewId);
or when i'm using
this.$upload.reset('ttdp', {
url:
reviews/ttd/upload/${this.review.id}``
});
still doesn't work it gave undefined also
yes
created(){
this.$upload.new('ttdr', {
extensions: ['jpeg', 'jpg', 'png'],
onSelect(file) {
file[0].preview((file) => {
this.ttd_reviewer = file.raw
})
},
onError() {
this.$message.error('Error uploading file.');
}
});
},
mounted(){
this.$upload.reset('ttdp', {
url: 'reviews/' + this.$auth.user().id + '/ttd'
});
},
Route::post('reviews/{id}/ttd', 'ReviewController@uploadTTD');
dd($request->id);
Its not working, it seems there's no something wrong
function _http(data) {
console.log(data.url)
this.Vue.http.post(data.url, data.body, {progress: data.progress}).then(data.success, data.error);
}
it returns undefined, so its not Laravel issue
so how ? please help me