CodeIgniter Forums

Full Version: Extend controller in subfolder
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum


In my Controllers folder, I have a folder name User. In this folder I have a controller name User, which extends CI_Controller. How do I go about extending this User class even though it is in a subfolder in the Controllers folder? CI seems to only look in the root of the Controllers folder and not in the subfolders to find a class to extend from (for example, the User class in my example).

This is probably something trivial, but I haven't found a solution yet.



El Forum

Read this!

CodeIgniter Base Classes: Keeping it DRY - by Phil Sturgeon


El Forum

This is one approach to tackle the problem. Thanks for your response.