Filtering tasks and links with SQL on LARAVEL

Hello eveyone!

I am new in dhtmlx libraries, I am developing a project with Gantt Chart, but I dont know how to filter specific projects for specific users, I already tried the tutorial for laravel and its working fine, but , that GanttController brings me all the data.

Solution I am working:

I add a foreign key column in gantt_tasks and gantt_links called “project_id”, so my idea its bring all the tasks and links but just for a specific project, the project that belongs to the loged user.

But I dont know how to filter that data, I am reading the documentation but the render_sql doesn´t recognize my table:

This is what I am rendering in the controller.(example with idPro = 1).

$connector->render_sql(“Select * from gantt_tasks,gantt_links where gantt_tasks.projects_idPro=gantt_links_projects_idPro and gantt_tasks.projects_idPro=1”,“id”,“start_date,duration,text,progress,parent”);

Outputs this error:

It seems it doesn´t recognize the table in the database.

Awesome people, if u could guide me solving this, I ll be so happy.
Good day!


Try to filter rendered events using this guide