How to manage different versions of an api with Lumen? An approach may be to manage different routes pointing to different controllers but that seems way too redundant. Copying existing code and placing it to versions does not seem fit, Please share if anybody has done this differently.
I have exactly asked the question, I cannot figure out where is your answer pointing towards, I want to dynamically match the version and use controller based on that.
@Sergiu17 By managing i meant i did not want to copy the v1/Controllers to v2/Controllers to use multiple versions of an api, does not that seem redoing the same thing, what do you suggest?
Recently I was very annoying with copying all the routes for v2. so I created a package to fallback versions. if a route is created for v1 and it didn't change you don't need to create v2 for it. it just automatically fallback to v1 https://github.com/mbpcoder/laravel-api-versioning
but it only works with Laravel. base on the Idea you could write a Lumen version.