Hi,
I want to use the api Gannt with router web.php
window.onload = function() {
gantt.init(“gantt_workshifts”);
gantt.load("/task/index");
var dp = new gantt.dataProcessor("/task");
dp.init(gantt);
dp.setTransactionMode(“REST”);
}
My problem is that gantt.load("/task/index") works but for put,delete,post i have 419 (unknown status)…
Maybe is because I don t use router api.php?
I try simple ajax call and work
$.ajax({
method: “DELETE”,
headers: {
‘X-CSRF-TOKEN’: $(‘meta[name=“csrf-token”]’).attr(‘content’)
},
contentType: “application/x-www-form-urlencoded”,
url: “/task/1”,
}).done(function( msg ) {
if(msg.error == 0){
//$(’.sucess-status-update’).html(msg.message);
console.log(msg);
}else{
console.log(msg);
//$(’.error-favourite-message’).html(msg.message);
}
});