Basicity of amines can be explained on the basis of availability of electron density on N-atom for protonation. Because of the $ +I $ effect, alkyl group increases the electron density on N-atom in alkyl amines. However, aniline is less basic because phenyl group exerts $ -I $ effect, ie, it withdraws electrons.