What is the best way to prevent water damage to foundation?

I started planting seed in what i'll call a flower bed in front of my house dirt directly in front of foundation layer and now I'm thinking I should have put something between the soil and foundation....

  3 answers