It was narrated that Abu Hurairah said:
“The Prophet ﷺ said: ‘Offer the (funeral) prayer for your children, for they have gone ahead of you (i.e. to prepare your place in Paradise for you).”
حَدَّثَنَا هِشَامُ بْنُ عَمَّارٍ، حَدَّثَنَا الْبَخْتَرِيُّ بْنُ عُبَيْدٍ، عَنْ أَبِيهِ، عَنْ أَبِي هُرَيْرَةَ، قَالَ قَالَ النَّبِيُّ ـ ﷺ ـ " صَلُّوا عَلَى أَطْفَالِكُمْ فَإِنَّهُمْ مِنْ أَفْرَاطِكُمْ " .