We know (e.g. [Godsil, Royle: Algebraic Graph Theory, [Lemma 13.2.3](https://books.google.com/books?id=GeSPBAAAQBAJ&pg=PA283)]) that any cofactor of the Laplacian matrix of a graph is constant, and is equal to the number of spanning trees of the graph. How do the cofactors change if I just add a diagonal matrix to the Laplacian matrix? Any help would be greatly appreciated.