加入数据表中的数据(laravel)

需要连接两个数据并编译显示在数据表中 但我不知道我的代码有什么问题

控制器

        $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;
   }
    }]

得到这个错误

加入数据表中的数据(laravel)

why111333 回答:加入数据表中的数据(laravel)

已解决

columns: [

    {data: 'items.it_arabic_name',render: function ( data,type,row ) {
        return row.it_arabic_name + ' ' + row.shp_destination_shipping_fees;
   }
}]
本文链接:https://www.f2er.com/3798.html

大家都在问