The Prophet (peace and blessings of Allaah be upon him) said: “Whoever has eaten of this plant (i.e., garlic), let him not approach our mosque.”
And he (peace and blessings of Allaah be upon him) said: “Whoever has eaten of this plant let him not approach our mosque and annoy us with the smell of garlic.” Narrated by Maalik in al-Muwatta’ (27).
Its forbidden to go to the Masjid after eating garlic and its like, but is there any evidence the Prophet actually hated garlic?