Maqil bin Yasar reported,

We were with the Prophet ﷺ on one of his journeys, and we stopped at a place where garlic grew abundantly. Some of the Muslims ate from it, then came to the prayer area to pray with the Prophet ﷺ. He forbade them from eating it.Later they came again to the prayer area, and he forbade them from it once more. Then they came yet again to the prayer area, and he forbade them from it again. Then they came once more to the prayer area, and he detected its smell on them, so he said, "Whoever eats from this plant must not come near us in our mosque."

Ahmad 20302

Daif

حدثنا محمد بن عبد الله بن الزبير حدثنا الحكم بن عطية عن أبي الرباب قال سمعت

معقل بن يسار يقول

كنا مع النبي ﷺ في مسير له فنزلنا في مكان كثير الثوم وإن أناسا من المسلمين أصابوا منه ثم جاءوا إلى المصلى يصلون مع النبي ﷺ فنهاهم عنها ثم جاءوا بعد ذلك إلى المصلى فنهاهم عنها ثم جاءوا بعد ذلك إلى المصلى فنهاهم عنها ثم جاءوا بعد ذلك إلى المصلى فوجد ريحها منهم فقال من أكل من هذه الشجرة فلا يقربنا في مسجدنا

أحمد 20302ضعيف
Contents
Reference
Commentary
Ayat
Collection
Musnad Ahmad
Book
Maqil bin Yasar
Numbering
Darussalam 20302
Ahmad 20302