Effect of +M and +R effect in basicity of 4-methoxy aniline
Since you mentioned the $\mathrm +M$ effect, I'm assuming you're familiar with resonance and aromaticity.
This is a structure of cyclohexane amine:

Here, the lone pair of electrons present on the Nitrogen atom make it a Lewis Base (an electron donor).
This is a structure of 4-methoxy aniline:

Here the lone pair of Nitrogen is delocalized due to resonance. Hence it's not readily available for donation. That's why 4-methoxy aniline is a weaker base.