Abu Mas`ud Al-Badri (May Allah be pleased with him) reported: The Prophet (sallallaahu ’alayhi wa sallam) said,
“When someone spends on his family seeking his reward for it from Allah, it is counted as a charity from him“. [Al-Bukhari and Muslim].
Commentary from Riyad-as-Saliheen: `Seeking his reward’ means that one is supporting his family as a duty entrusted by Allah. It is also warranted by compassion for the near ones. A person who does it as a duty ordained by Allah and shows mercy to his deserving relatives to attain His Pleasure then what he spends with this intention on his children will be eligible for reward from Allah.