Filtering Gantt by the Project ID

Hi just like to ask about that was answered from this link
how-to-use-filter-in-laravel/

this is thecode Im stuck with on where would I put this code?

$connector = new GanttConnector(null, “PHPLaravel”); $connector->configure( GanttTask::where(‘project_id’, ‘=’, 1)->get(), “id”, “start_date,duration,text,progress,parent,project_id” ); $connector->render();

Hi,
If you use Laravel I’d recommend implementing the backend manually rather than using the connector library.
You can find a tutorial and a demo here:
https://docs.dhtmlx.com/gantt/desktop__howtostart_php_laravel.html

Once you have your backend configuring it will be easy to add any kind of filtering inside a controller action
https://docs.dhtmlx.com/gantt/desktop__howtostart_php_laravel.html#step4loadingdata

1 Like