Bara bin Azib reported,

The Messenger of Allah ﷺ used to walk through the rows from one side to the other, touching our shoulders and chests, saying, "Do not be uneven, for then your hearts will fall into discord." He would also say, "Indeed, Allah and His angels send blessings upon the front rows."

Nasai 812

Sahih

أخبرنا قتيبة بن سعيد قال حدثنا أبو الأحوص عن منصور عن طلحة بن مصرف عن عبد الرحمن بن عوسجة

عن البراء بن عازب قال

كان رسول الله ﷺ يتخلل الصفوف من ناحية إلى ناحية يمسح مناكبنا وصدورنا ويقول لا تختلفوا فتختلف قلوبكم وكان يقول إن الله وملائكته يصلون على الصفوف المتقدمة

النسائي 812صحيح
Contents
Reference
Commentary
Ayat
Collection
Sunan Nasai Sughra
Book
Leadership
Chapter
How the imam arranges the rows
Numbering
Darussalam 812
Nasai 812