how to properly structure controllers in HMVC |
HI ,
this is my first project using hmvc. i am confused how to organize modules. my site have admin area , authenticated area and public area. in mvc i would do it this way controllers --admin ----------users ----------products ----------orders --public ----------users ----------products ----------orders --auth ----------users ----------products ----------orders how to organize things in hmvc?
love codeigniter
Learning best practices Rate my post if you found it helpfull
modules
-- admin ---- users ---- products ---- orders -- public ---- users ---- products ---- orders -- auth ---- users ---- products ---- orders What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
Also remember
1 table equals 1 model 1 table equals 1 controller You can create many views... I learned these from David Conelly
(06-29-2016, 05:53 PM)InsiteFX Wrote: modules what about models.?i have to create user model in all three modules?
love codeigniter
Learning best practices Rate my post if you found it helpfull
Controllers may be loaded from application/controllers sub-directories.
Controllers may also be loaded from module/controllers sub-directories. --> Resources may be cross loaded between modules. ie: $this->load->model('module/model'); Modules::run() is designed for returning view partials, and it will return buffered output (a view) from a controller. The syntax for using modules::run is a URI style segmented string and unlimited variables. What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
|
Welcome Guest, Not a member yet? Register Sign In |