The Prophet ﷺ said, "When a Muslim spends on his family seeking reward from Allah, it is counted for him as charity."
عن النبي ﷺ قال: إن المسلم إذا أنفق على أهله نفقة وهو يحتسبها كانت له صدقة.
Bukhari narrated it in the Book of Faith (55), and Muslim in the Book of Zakat (1002), both of them through Shubah, from Adi bin Thabit, from Abdullah bin Yazid, from Abu Masud, who related it.