Hadithcore
Mishkat al-Masabih, 1707

Ibn ‘Umar told that when the dead was placed in the grave the Prophet (ﷺ) said, “In the name of God, by God’s grace, and following the religion of God’s messenger.” A version has “And following the <i>sunna</i> of God’s messenger.” Ahmad, Tirmidhi and Ibn Majah transmitted it, and Abu Dawud transmitted the second version.

وَعَنِ ابْنِ عُمَرَ أَنَّ النَّبِيَّ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ كَانَ إِذَا أَدْخَلَ الْمَيِّتَ الْقَبْرَ قَالَ: «بِسم الله وَبِاللَّهِ وعَلى ملكة رَسُولِ اللَّهِ» . وَفِي رِوَايَةٍ: " وَعَلَى سُنَّةِ رَسُولِ اللَّهِ. رَوَاهُ أَحْمَدُ وَالتِّرْمِذِيُّ وَابْنُ مَاجَهْ وَرَوَى أَبُو دَاوُد الثَّانِيَة

References1 variant
In-Book Reference
Book 5, Hadith 179