Section 18. Upon or after a judgment of nullity, the court shall have like power to make orders relative to the care, custody and maintenance of the minor children of the parties as upon a judgment of divorce.