Show gantt chart refer to project id using laravel connector

Greetings, currently i have integrate dhtmlx gantt in Laravel using laravel connector. I have followed this guide and it works. [url][/url].

Now, What I am trying to do, is to show gantt chart refer to project id, so I tried use query in GanttController. But I receive a blank gantt table. Is the query correct? If no,please guide me to debug this error. I have included the snippet and screenshot. Thanks

namespace App\Http\Controllers;
use App\GanttTask;
use App\GanttLink;
use Dhtmlx\Connector\GanttConnector;

class GanttController extends Controller
    public function data() {
        $connector = new GanttConnector(null, "PHPLaravel");
        $connector->render_links(new GanttLink(), "id", "source,target,type");


there are no obvious issues with your code.
Try enabling connector logging, it may give a clue

Also, make sure that you’ve set a format for dates on a client side … onfig.html

Hi thanks for reply. I have enable the log, but where I can find the logfile that create from dhmtlx gantt plugin.However,I received an error where I check in localhost:8000/gantt_data .

ErrorException in PHPLaravelDBDataWrapper.php line 14:
Non-static method Illuminate\Support\Collection::all() should not be called statically, assuming $this from incompatible context

Can I get guide on debug this error?

Anybody can help me?


Please try to update connector from the github, it already contains a fix for the issue.

Thank You for reply, just updated with latest bug fix using “composer update” and it works.
But I have a doubt, does this where() method works also if we add new task/ edit a task?

Because I have added a new task,but it is not saved in the database.

It only save into database when i remove this code

	 GanttTask::where('project_id', '=', 2)->get(),

and replace with this code

$connector->render_table(new GanttTask(),"id","start_date,duration,text,progress,parent");