When a Muslim spends on his family seeking reward for it from Allah, it counts for him as sadaqa. (Using translation from Muslim 1002a)
عَنِ النَّبِيِّ ﷺ قَالَ «إِنَّ الْمُسْلِمَ إِذَا أَنْفَقَ عَلَى أَهْلِهِ نَفَقَةً وَهُوَ يَحْتَسِبُهَا كُتِبَتْ لَهُ صَدَقَةً»