The properties of Tzitz´eica equations in nonlinear optics have received a great attention of many recent studies. In this work, the so-called generalized exponential rational function method (GERFM) has been applied for finding the analytical solution of two nonlinear partial differential equations type of equations, namely Tzitz´eica-Dodd-Bullough and Tzitz´eica equation. The proposed method provides a wide range of closed-form travelling solutions leading to a very effective and simply-applied method by means of a symbolic computation system. The method not only provides a general form of solutions with some free parameters but also shows potential application to other types of nonlinear partial differential equations.