Gii – Generating Module

  • Post author:
  • Post category:Yii
  • Post comments:0 Comments

Let us see how to generate a Module.

Step1Ā āˆ’ To generate a module, open the module generation interface and fill in the form.

Step2Ā āˆ’ Then, click the ā€œPreviewā€ button and ā€œGenerateā€.

Step3Ā āˆ’ We need to activate the module. Modify theĀ modulesĀ application component in theĀ config/web.phpĀ file.

'modules' => [
   'admin' => [
      'class' => 'app\modules\admin\Module',
   ],
],

Step4Ā āˆ’ To check whether our newly generated module works, type the URĀ http://localhost:8080/index.php?r=admin/default/indexĀ in the web browser.

Leave a Reply