Gii - Generating Module


Advertisements


Let us see how to generate a Module.

Step 1 − To generate a module, open the module generation interface and fill in the form.

Module generator

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.php file.

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

Step 4 − To check whether our newly generated module works, type the UR http://localhost:8080/index.php?r=admin/default/index in the web browser.

Generated module Works

Advertisements
E-Books Store