let us see how to generate a module.
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.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.