Laravel gannt dhtmlx problem with route


I want to use the api Gannt with router web.php

window.onload = function() {
var dp = new gantt.dataProcessor("/task");

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

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){

do you have this issue with laravel?
it’s probably related to csrf token value, at least that how it looks like after a quick search … own-status

pls check if you have a following in your blade template:

<meta name="csrf-token" content="{{ csrf_token() }}">

and can you check the value of that tag at the runtime, please execute following in browser console:


does the value look as expected? i.e. not an empty string and not ‘{{ csrf_token() }}’ string

Thanks resolved

I face the same issue when I was doing programming on ignou pgdrd project but now the issue is resolved