RobKohr
RobKohr

Reputation: 6953

Bundle up things in Codeigniter to use in multiple projects

I have a bunch of projects with codeigniter that all use a user controller. The controller does login, registration, user pages, etc. It also has a collection of views and a model. All of this stuff falls under /users/* in the url routes.

It would be great if all of this stuff that I reuse in each project was in one folder so it would be easy to do version management on it alone, and so it was easy to transport from project to project.

Is there a good way to do this with codeignighter?

Note: I use "user" as an example, but there are many things that I would like to bundle up and just drop into projects, such as forums, admin, etc.

Upvotes: 0

Views: 160

Answers (1)

CodeReaper
CodeReaper

Reputation: 6155

If your code is reuseable (also for others) you could roll up a spark for it, see sparks.

If your code is reuseable for you alone you may have to use the HMVC modular setup as mentioned by @Dave and @dianuj or go with git submodule which I personally haven't had too much success with.

Upvotes: 1

Related Questions