[Vuejs]-Invalid argument for gantt.parse or gantt.load (laravel and vuejs)

0👍

Gantt expects the data in the JSON format. But the gantt.load() method doesn’t separately send the arguments to the server-side. You can try using the custom routing, but you need to manually implement a function to send the data to the server-side, then you can add it in the "create", "update" and "delete" actions:
https://docs.dhtmlx.com/gantt/desktop__server_side.html#customrouting

Or you can try obtaining the ID in the controller, for example:

public function get($id){
    // $id: "/api/data/34"
    $id = substr($id, 10); // $id: "34"
    $tasks= new Task;
    if($tasks->projet_id== $id){ // $id: "34"

Leave a comment