Creating a module in Yii framework is very easy.
Any one can see bellow link:
Here I will describe how any one can create a module very easily in Yii.
Yii have a code generator that is called gii.
|1. If we have several database table, then 1st we need to generate model and CRUD from GII.|
|2. All model and CRUD files will now in protected folder (controllers/models/views).|
|3. Now we will generate a basic module from GII. If i create a module named category, then in modules folder, there will be a folder name category. And only highlighted folder/files will create.|
|4. Now cut files from protected folders (controllers/models/views), to the new modules folders. Like in the upper picture, black crossed files, corresponding controller are now in module controller folder and so is others (models/views).|
|5. For view the pages, URL will be same, just need to add the module name in-font of the all URL.|
|6. And of-course we have to add module name in main config file: