The Prophet ﷺ said, "When a man spends on his family seeking reward from Allah, it counts for him as charity."
أخبرنا محمد بن بشار قال حدثنا محمد قال حدثنا شعبة عن عدي بن ثابت قال سمعت عبد الله بن يزيد الأنصاري يحدث
عن النبي ﷺ قال إذا أنفق الرجل على أهله وهو يحتسبها كانت له صدقة
Recorded by Muslim, in "The Book of Zakat," chapter "The virtue of spending and giving charity on relatives... etc.," hadith no. 1002, from Muhammad bin Bashshar, and by Bukhari, in "The Book of Faith," chapter "What has been said that deeds are judged by intention and expectation of reward," hadith no. 55, through the hadith of Shubah with the same wording, and it is also found in Al-Kubra, hadith no. 2325.