Welcome Guest, Not a member yet? Register   Sign In
sharing models and controllers between several sites/apps?
#1

[eluser]Unknown[/eluser]
Hello,
I was wondering if there are any provisions in CI to share models and controller classes between different sites or apps? I have several websites that share a lot of business logic and also a lot of user interaction js/controllers and i would not want to duplicate all of these because that would be a maintenance nightmare.

i know it's easy to share js/css because they are just browser includes, but not sure about any core stuff.

thanks,
Leon
#2

[eluser]Colin Williams[/eluser]
You could always use symlinks

Code:
ln -s /path/to/site1/app/controllers/example.php /path/to/site2/app/controllers/example.php

And it doesn't have to be a nightmare to have two separate instances of the same controller or model. Just maintain one "core" version and push it out to all apps/sites when it's updated and is stable.




Theme © iAndrew 2016 - Forum software by © MyBB