In all cases wherein the bill or petition is filed upon the relation of a prosecuting attorney of this state and a permanent injunction is granted therein, the officer shall receive such fees as are now provided by law for convictions for the illegal sale of intoxicating liquors. The fees shall be paid by the defendant as part of the costs of the case.