"When he Prophet put the deceased in the grave" He said: And Abu Khalid (one of the narrators) said [one time]: "When he placed the deceased in the Lahd" - "He said one time: 'In the Name of Allah, by His command and upon the Millah of the Messenger of Allah.' and one time he said: 'In the Name of Allah, by His command and upon the Sunnah of the Messenger of Allah."
أَنَّ النَّبِيَّ ﷺ كَانَ إِذَا أُدْخِلَ الْمَيِّتُ الْقَبْرَ وَقَالَ أَبُو خَالِدٍ مَرَّةً إِذَا وُضِعَ الْمَيِّتُ فِي لَحْدِهِ قَالَ مَرَّةً بِسْمِ اللَّهِ وَبِاللَّهِ وَعَلَى مِلَّةِ رَسُولِ اللَّهِ وَقَالَ مَرَّةً بِسْمِ اللَّهِ وَبِاللَّهِ وَعَلَى سُنَّةِ رَسُولِ اللَّهِ ﷺ