Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to generate crud in modules folder in yii

Tags:

yii

I am try create CRUD Through GII in YII Framework in modules folder .But there one option to change the CRUD path.

like image 934
Kaletha Avatar asked Apr 29 '11 08:04

Kaletha


People also ask

How to Create module in YII2 using Gii?

Step 1 − To generate a module, open the module generation interface and fill in the form. Step 2 − Then, click the “Preview” button and “Generate”. Step 3 − We need to activate the module. Modify the modules application component in the config/web.

How to use Gii in YII2?

To use Gii to generate an Active Record class, select the "Model Generator" (by clicking the link on the Gii index page). Then fill out the form as follows: Table Name: country. Model Class: Country.


1 Answers

I looked around for this too. Hope this will help.

  1. Create a module via Module Generator.
  2. Register your module name in the config main.php (modules array)
  3. Create a model via Model Generator. Fill in the fields and put this in Model Path : application.modules.[module-name].models
  4. Create crud via Crud Generator. Fill in the fields and put this in Model Class: [module-name].models.[model-name]

Sorry the reference is in Indonesian. Source

like image 94
xzoidberg Avatar answered Sep 23 '22 14:09

xzoidberg