I heard Jabir bin `Abdullah saying, "The Prophet (ﷺ) said, 'Whoever eats (from) this plant (he meant
garlic) should keep away from our mosque." I said, "What does he mean by that?" He replied, "I think
he means only raw garlic."
Sahih al-Bukhari Book 10, Hadith 245