Create a front end subfolder and backend subfolder in modules folder using HMVC inside codeigniter

853 views Asked by At

I am new to codeigniter and using HMVC what I would like to do is separate front-end and backend modules in folders like this:

modules (folder)
 frontend (folder) 
  -some module name (folder)
 back-end (folder)
  -some module name (folder)

Please any help would be brilliant and thank you in advance.

1

There are 1 answers

0
Nithin Krishnan P On

this is a good idea.. this will work with codeigniter. When u calling the controller you have mention the folder of the controller. for example, this is the folder structure :

modules (folder)
 frontend (folder) 
  -some module name (folder)
    -- controller-1
     ---- function 1.1
     ---- function 1.2
     ---- function 1.1

 back-end (folder)
  -some module name (folder)
    -- controller-2
     ---- function 2.1
     ---- function 2.2

calling the function 1.1 as <?php echo base_url()?>index.php/frontend/module_name/controller_1/function1.1