Strangely enough, I was looking this up a few months ago, as I would like to try to attract a hedgehog into our garden. The advice was to give cat food and, as someone above said, don’t give bread and milk. Also, if you create a little hole in your garden fences, not much bigger than the size of the short end of a brick, the hedgehog will then have access to other gardens, where it might go for water etc.. We’ve put an upturned plastic container plus lid in our garden, in which we have cut an entrance hole. We put a little food in there but the truth of the mater is a rat or mouse might pick up on it as well. Still, fingers crossed …. .