The Prophet ﷺ said, "Whoever eats from this plant," meaning garlic, "let him not come near our mosque."
حدثنا عبد الرزاق أخبرنا ابن جريج قال زعم لي عطاء قال سمعت
قال النبي ﷺ من أكل هذه الشجرة قال يريد الثوم فلا يغشنا في مسجدنا
Its isnad is sahih, mentioned previously at 12872.