Welcome Guest, Not a member yet? Register   Sign In
Codeigniter 3 + HMVC (sub-direcotry in modules)
#1

(This post was last modified: 11-17-2017, 11:29 AM by csanesz.)

I use HMVC wiredesignz third party to use modular structure for Codeigniter.

I there a way to create a subfolder in the modules directory ?

I want something :
Code:
modules
   module1
      controllers
          Module1.php
      ...
   admin
      module2
          controllers
              Module2.php
           ...    
      module3
          controllers
              Module3.php
           ...

Of course I've tried to call with :
Code:
base_url('admin/module2/index');

I've got a 404 error. Is this possible ?

Thanks
Reply
#2

Hello!

I solved!

The link below has helped solve this problem.
https://forum.codeigniter.com/thread-915...l#pid59163

The module name and controller name may be different.
domain\module\controllers\method\param

If the module name equal the controller name, it is enough the controller name.
domain\controllers\method\param

So directory structure:


Code:
modules
  admin
   controllers
     User.php
     Page.php
     News.php
  product
    controllers
     Product.php
 contact
   controllers
     Contact.php
     
Reply
#3

If you look at the documentation there is also a config item that can be added to the CodeIgniter configuration file.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply
#4

Which one do you think?
Reply




Theme © iAndrew 2016 - Forum software by © MyBB