My garden is surrounded by cats so you can imagine the problem I had when I created a raised bed . What started off as a challenge soon became a serious issue, I've got young children so cat crap is not only disgusting, it's also dangerous. I literally tried everything and I can assure you now that the only thing that truly works is a water sprayer. Cats hate water! It cost be about £50 but honestly it''s the best investment I ever made.
I actually watched my nemesis' come into my garden, look around and then skulk up to it's usual spot. When the sprayer went off it jumped out of it's skin and legged it. You'll have to make sure you keep it switched on though as they will come back after a little while.
Last month, one of the most prolific offenders was sadly knocked down by a car (not mine). I swear my neighbour thinks it was me.