Home yii2 How to connect GII in Yii2 Advanced

How to connect GII in Yii2 Advanced

Author

Date

Category

I install it via Composer, prescribed settings in frontend / config / main.php , but at /index.php?r=GII does not show anything, then There is a standard page. What did I do wrong?

frontend / config / main.php

'bootstrap' = & gt; ['gii'],
'modules' = & gt; [
  'gii' = & gt; 'Yii \ gii \ module',
  // ...
],

Answer 1, Authority 100%

  1. frontend / config / main.php

    ‘urlmanager’ = & gt; [
    ‘enableprettyurl’ = & gt; True
    ‘shavescriptname’ = & gt; false
    ],

2. Frontend / config / main-local.php

if (! yii_env_test) {
  // Configuration Adjustments for 'Dev' Environment
  $ Config ['Bootstrap'] [] = 'debug';
  $ config ['modules'] ['debug'] = [
    'Class' = & gt; 'Yii \ Debug \ module',
    'Allowedips' = & gt; ['*'],
  ];
  $ config ['bootstrap'] [] = 'gii';
  $ config ['modules'] ['gii'] = [
    'Class' = & gt; 'Yii \ gii \ module',
    'Allowedips' = & gt; ['*'],
  ];
}

Now you can go to site.com/gii
(if you have BaseURL = & gt; ” for the front)

Programmers, Start Your Engines!

Why spend time searching for the correct question and then entering your answer when you can find it in a second? That's what CompuTicket is all about! Here you'll find thousands of questions and answers from hundreds of computer languages.

Recent questions