  To identify the key parameter for optimal superconductivity in iron
pnictides, we measured the $^{31}$P-NMR relaxation rate on
BaFe$_{2}$(As$_{1-x}$P$_{x}$)$_{2}$ ($x = 0.22$ and 0.28) under pressure and
compared the effects of chemical substitution and physical pressure. For $x =
0.22$, structural and antiferromagnetic (AFM) transition temperatures both show
minimal changes with pressure up to 2.4~GPa, whereas the superconducting
transition temperature $T_{\rm c}$ increases to twice its former value. In
contrast, for $x=0.28$ near the AFM quantum critical point (QCP), the
structural phase transition is quickly suppressed by pressure and $T_{\rm c}$
reaches a maximum. The analysis of the temperature-dependent nuclear relaxation
rate indicates that these contrasting behaviors can be quantitatively explained
by a single curve of the $T_{\rm c}$ dome as a function of Weiss temperature
$\theta$, which measures the distance to the QCP. Moreover, the $T_{\rm
c}$-$\theta$ curve under pressure precisely coincides with that with chemical
substitution, which is indicative of the existence of a universal relationship
between low-energy AFM fluctuations and superconductivity on
BaFe$_{2}$(As$_{1-x}$P$_{x}$)$_{2}$.
