I have decided to start porting my Yii 1 app to v2, and so I came to Gii. Confused with multiple configs (didn’t fully grasp the Guide) I cannot see where Gii gets included. According to my understanding of Guide, Gii is supposed to be available with dev enviroment with no gymnastics. It does not.
I added the line below in main-local.php but it did not work too. Anything I need to make Gii work?
Also as side question, where is UrlManager component configurations?
I use advanced template from Yii repo installed via composer.
I’ve just started with Yii 2 as well and I haven’t encountered any problems with Gii.
Have you initialized the application with the “init” command in the Development environment? The Gii is already configured in the main-local.php (for both frontend and backend) so it shouldn’t be necessary to add any line.
Regarding the UrlManager component, I’m not that sure but I’ve placed it into common\config\main.php since I needed the same config for both frontend and backend.
Well I have all those and I had impression that it should work, however it does not. Each time I type url it redirects to google search (I guess it fails to find the page). I will check my server configurations.
Very strange!
Cool, I thought we have a pre-configured rules like Yii 1.x that is what I was trying to locate. If there is none, then I know where to add mine.
strange thing is even http://localhost/project/frontend/web/index.php (note the added index.php) does not work and causes google search to be invoked! So am starting to suspect either my URL config or The server itself.
Anyone who is willing to share their configurations story as far as Yii2 is concerned?
Previous version of firefox used to append the "http://" part of the URL but this new version does not. And to my surprise, it will not even try the request as http rather it treats as "search query".
I do not know if it is by design or bug but I will live with it.