Is there a way to dynamically assign an API version to a client based on their client app version?

@odan I’m not too sure what you mean. I already extract the client version in a middleware (application, not route). I just don’t know how to use it to route a user to using a specific set of files.

Are you suggesting include-ing my files (including my routes.php file) inside my application middleware? I think I actually used to do that, but it was causing problems if I recall correctly.

Basically my question is this: how do I route users (to a completely different set of files) if I want to stop using URI versioning?

Edit:

It seems that something like what was suggested in this post might help me. Basically use $_SERVER[...] to extract the $value I need (be it URI /v1.0 version, the Accept: header, or a custom Client-App-Version header), switch($value) and include files as needed.
Does this sound like a good solution/practice?