In this paper, we define a graph operation, namely, M-edge rooted product of graphs. This generalizes the existing graph operation called graphs with edge pockets. Also we introduce a matrix invariant, namely, coronal of a matrix constrained by the index sets. We compute this value for some class of matrices with respect to some index sets. We obtain the generalized characteristic polynomial of the graph obtained by M-edge rooted product with a help of this invariant. Consequently, we deduce the characteristic polynomial of the adjacency matrix, the Laplacian matrix and the signless Laplacian matrix of this graph. Using these results, we derive the L-spectrum of several families of M-edge rooted product of graphs and deduce several existing results on the spectra of graphs with edge pockets in the literature. As applications, we obtain infinitely many L-cospectral graphs and construct A-integral graphs, L-integral graphs.