Conditional Routing in Symfony using ENV Vars

Posted on Sunday February 23, 2020

I recently wanted to be able to control whether a route was available based on an environment variable, in dev I wanted it available, but in production I wanted it turned off (for now). I like using feature flags and environment variables to toggle things on and off, and thought I'd write up how I did it here.

Built with Tailwind CSS using Hugo hosted on Netlify
© 2020 Matt Brunt