6 month old with constipation :(

I have a 6 month old boy who is struggling with constipation :( I've given him miralax like the doctor said, I've given him fresh fruits, water and been taking him into the pool to get his legs moving.. I'm running out of ideas. Is anyone else having this problem?