Hello everyone, I am trying to join multiple tables in my controller.php but i am getting errors. I managed to join two tables into an Array like that;
$currentValues = DashboardMapItem::where('system_id', $system_id)->orderby('datetime', 'DESC')
->select()->join('device_data_current', function($join){
$join->on('device_data_current.id', '=', 'dashboard_map_items.device_id');
$join->on('device_data_current.command', '=', 'dashboard_map_items.command');
})
->get();
but I cannot add the third table (devices) to the code, can anyone help me?
Thanks,
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community