I am creating responsive website using CodeIgniter with following roles
doctor
hospital
guest
Each role has admin dashboard.
The website has 3 versions.
desktop version
mobile versioin
tab version
I have decided to use the HMVC modular framework to group the modules in the project.
Can anybody suggest me the suitable folder structure to my requirement.
Thanks in advance,
Santosh
#santosh,
You can use the HMVC folder structure for this problem
here you have to make a module for each
like if you want to make doctor module then make all the files and folders under doctor module
Doctor
-Controllers
-controller_file.php
-Models
-model_file.php
-View
-view_file.php
and put them in your module folder.
And you can also use Bonfire version for the HMVC codeigniter.
please visit cibonfire.com
this is the best for HMVC codeigniter
Related
If this question is already asked, I apologize, but couldn't find anything that could solve this. I have a project on CodeIgniter and I want to create a module/plugin/extension system, just like Joomla or any other CMS where you can add custom built modules with different functionality, but haven't done anything like this before, so I'm asking for a way of making this possible.
Module system for codeigniter HMVC
Go to https://bitbucket.org/wiredesignz/codeigniter-modular-extensions-hmvc
Download branches default download for codeigniter 2 HMVC and you can download codeigniter 3 HMVC latest version for CI-3
That way you can create your own modules how ever you want. I am making something like open cart but for codeigniter.
I have an App in CodeIgniter built using the regular MVC pattern. If I want to switch to HMVC then I have to move all Models,Views and Controllers to the modules folder? I don't understand if in HMVC everything is a module or both Modules and the old MVC structure can coexist.
H in HMVC stands for hierarchical, the files in your normal controllers,vews and models folders are on top of the hierarchy. This means that you can still use or old controllers,models,views folders. These folders will then be accessible by all modules in your system.
I'm going nuts with this legacy project. It was developed with the Symfony PHP framework and i never worked with it before. Seems to me that the only way to do things is using the CLI tool. But the tools work generally with all the application.
The Symfony project is organized like the following:
root directory
apps directory
and all other common directories in a Symphony project
The apps directory contains two more directories: "cms" and "site".
I want to build just ONE admin module, a CRUD, into the "cms" app.
The "cms" directory is the admin part of the application. Can you guys give me a hand to do this?
Thanks!!
run the task for generating module..
php symfony generate:module cms CRUD
where cms is the app name and CRUD is the module name
I'm trying to figure out how I can work with module separation with codeigniter.
Lets say I have a news module where its inside of the application folder and inside the news module folder I have a controllers, models, views folders and files inside of those.
Do I need something additional to do this?
If you want to work with modules in codeigniter you can use Modular Extensions - HMVC which makes codeigniter modular. Here is the link https://bitbucket.org/wiredesignz/codeigniter-modular-extensions-hmvc/wiki/Home
I hope this helps.
I'm working on a content management system in Codeigniter with the Datamapper and HMVC extension. My question is, how to handle submodules.
Example:
I want to create an User module which exists from Users, Usergroups, Rights and Modules. In codeigniter I have build it now like this:
Codeigniter root
application
modules
Users
models
user
right
usergroup
module
Is this the right way to fix it or am I doing it wrong?
You can't have submodules in HMVC without extending the MY_router class.
You have a nice tutorial here: HMVC: an Introduction and Application