Why do i get this error? I have the right relationships and in tinker, it works really well, do u guys have any idea about this?
Controller:
$emp = Empresa::find($request->empresa_id);
$mov = $emp->movimientos()->where('linea_id', intval($request->id_caso))->with('producto_nombre', 'costo_promedio');
return DataTables::of($mov)->make(true);
Thx for the help.



movimiento.linea_id