I have a controller called ‘admin’
class Admin extends CI_Controller {
and under the admin controller I want to have a series of controllers like:
class Settings extends CI_Controller {
class Preferences extends CI_Controller {
Is it possible to have these controllers extend the Admin controller?
like
class Settings extends Admin {
Is it possible?
Yes, it is possible. You just have to create your extended controller in the /core/ directory of your application, like so:
Then, you can create controllers that extend MY_Controller in the /controllers/ directory of your application, like so:
Pay attention to the class and file naming convention.
Read more about it in the CodeIgniter User Guide, on how to extend the Core.