Setting Up HMVC in CodeIgniter 2.1.2

485

This article about how to setup Hierarchical Model-View-Controller (HMVC) on CodeIgniter 2.1.2. Here we go the step how to seting up on CodeIgniter 2.1 :

  1. Download wiredesignz HMVC zip file from bitbucket.org.
  2. Extract the files from the zip.
  3. Move all of the files from the newly extracted folder’s ./core/ directory to CodeIgniter’s /application/core/ directory on your server.
  4. Move the MX directory and all of its files from the newly extracted folder’s ./third-party/ directory to CodeIgniter’s /application/third-party/ directory on your server.
  5. Going to application folder and create the new one folder called /application/modules/
  6. Add the following to your /application/config/config.php file on your server:

 

How to test ? like usual you do with CI. Dont forget to create the Hierarchical Folder like bellow:

  • /application/modules/module_name/
  • /application/modules/module_name/controllers/
  • /application/modules/module_name/models/
  • /application/modules/module_name/views

If you feel this tutorial to short, you can try this file on your desk. This is a package CodeIgniter 2.1.2 with HMVC , you can download this file.

Enjoy and happy coding!

 

 

3 COMMENTS

LEAVE A REPLY