Welcome Guest, Not a member yet? Register   Sign In
Versioning code in codeigniter
#4

[eluser]CroNiX[/eluser]
[quote author="shethvarun" date="1411501144"]I dont want the url's to reflect the version id but want the routes to determine which version it is and appropriately process the business logic based on the version[/quote]
But routes determine where to send the request based on the current url, so it would have to be in the url wouldn't it?

You could always use a query string, ?v=1/?v=2, and have the models/controllers load the appropriate versioned code. Or a dropdown in a menu that appears on every page, which sets a session variable or something.

Personally I would have just created a separate project on it's own vhost, so you could go to http://project1.dev or http://project2.dev because you're going to have a bunch of temporary code now that you're going to have to add and then remove when you're done doing it this way.


Messages In This Thread
Versioning code in codeigniter - by El Forum - 09-22-2014, 01:44 PM
Versioning code in codeigniter - by El Forum - 09-22-2014, 04:01 PM
Versioning code in codeigniter - by El Forum - 09-23-2014, 12:39 PM
Versioning code in codeigniter - by El Forum - 09-23-2014, 01:59 PM



Theme © iAndrew 2016 - Forum software by © MyBB