dhtmlxGantt with laravel

I want to create a parent-child type diagram, I retrieve the data via Laravel, I do get my data from the database in my JavaScript code, the diagram retrieves the parents but not the children. Why is that

@vite('node_modules/dhtmlx-gantt/codebase/sources/dhtmlxgantt.css')

Hello,
If you load a child task without its parent task, it won’t be displayed, and it should be expected as there is no node to display the child task:
Task Properties Gantt Docs.

So, you need to modify the parent parameter when loading tasks:

gantt.attachEvent("onTaskLoading", function (task) {
    if (!gantt.isTaskExists(task.parent)) {
        task.parent = '0';
    }
    return true;
});

Here is an example in the snippet:
https://snippet.dhtmlx.com/iwsacjb3

If that doesn’t help you, probably, the issue is related to the Gantt configuration, but it is hard to suggest what might be wrong as I don’t see your code.
In that case, please send me a ready demo with all the necessary JavaScript and CSS files so that I can reproduce the issue locally.