need to join two data and compile to show in datatable but i dont know what is wrong in my code
controller
$data = DB::table('items')
->join('shipments', 'shipments.shp_no','=','items.shp_no_for_it')
->select('items.it_arabic_name', 'shipments.shp_destination_shipping_fees')
->get();
return Datatables::of($data)
->make(true);
ajax
columns: [
{data: 'items.it_arabic_name',
render: function ( data, type, row ) {
return row.items.it_arabic_name + ' ' + row.shipments.shp_destination_shipping_fees;
}
}]
get this error
solved
columns: [
{data: 'items.it_arabic_name',
render: function ( data, type, row ) {
return row.it_arabic_name + ' ' + row.shp_destination_shipping_fees;
}
}]