phpcodeigniterhmvc

HMVC on CodeIgniter 3 not working - getting 404


I 'm trying to set up modularity on my CI 3 installation, but seems not working. I'm using wiredesignz package found here under the "Branches" tab.

The steps I did:

  1. Copied MY_Loader & MY_Router in application/core
  2. Copied MX folder in application/third_party
  3. Copied this line of code in application/development/config.php ( I have moved config.php under development folder )

    // set location for modules $config['modules_locations'] = array( APPPATH.'modules/' => '../../modules/', );

  4. Created

    application - modules -- controllers --- Test.php -- models -- views --- test.php

with my Test.php like this

class Test extends CI_Controller {

    function __construct() {
        parent::__construct();
    }

    public function index() {
        $this->load->view('test');
    }
} 

just to check that is working ok, but when I hit on my browser localhost/myapp/test, I get a 404 error.

Any ideas what I'm doing wrong?


Solution

  • Have you tried to put the controllers and views in test folder inside the modules folder?

    Means something like that

    application/modules/test/controllers/Test.php