Bishr bin Bashir al-Aslami narrates from his father, Sayyiduna Bashir al-Aslami (may Allah be pleased with him), who had companionship with the Prophet (peace and blessings be upon him). He said that the Messenger of Allah (peace and blessings be upon him) said: "Whoever eats from this plant, let him not come near our mosque," meaning garlic.
Hadith Referenceالمعجم الكبير للطبراني / باب الباء / 1214