CodeIgniter Forums
Multiple applications with shared libraries on v3.x - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: Best Practices (https://forum.codeigniter.com/forumdisplay.php?fid=12)
+--- Thread: Multiple applications with shared libraries on v3.x (/showthread.php?tid=61409)



Multiple applications with shared libraries on v3.x - yodapt - 04-14-2015

Hi,

I am not new to CI development but it's been some 5 years since I last worked with it.

While developing a website I though about using the same libraries (system) in 2 applications, the frontend and admin of the website, and was wondering what would be the best approach to do so, if I just need to rename the paths in the index or something else I should be wary of.

Thanks in advance.


RE: Multiple applications with shared libraries on v3.x - CroNiX - 04-14-2015

You might look into CI packages. http://www.codeigniter.com/user_guide/libraries/loader.html?highlight=packages#application-packages


RE: Multiple applications with shared libraries on v3.x - CroNiX - 04-14-2015

Oh, sorry just saw the "system" libraries.... Yeah just install /system wherever you want and just tell $system_path in index.php where it is.


RE: Multiple applications with shared libraries on v3.x - alenn - 04-16-2015

Like CroNix said, just change your $system_path in index.php will do.

Some links for references:
http://www.codeigniter.com/user_guide/general/managing_apps.html
http://code.tutsplus.com/tutorials/6-codeigniter-hacks-for-the-masters--net-8308


RE: Multiple applications with shared libraries on v3.x - waifung - 04-16-2015

I met similar situation and after some years I have worked out my own practice to include both frontend and admin panel within single CI application.

You may have a look on my repositories to give you some inspiration:
https://github.com/waifung0207/ci_bootstrap (for CI2, separate application folders)
https://github.com/waifung0207/ci_bootstrap_3 (for CI3, single application folder with shared classes / config files, but currently work-in-progress)