i downloaded the advanced template, extracted it and changed the root documents for the back-end and the front-end, but i can't seem to figure out how to get Gii working to perform the crud operations.
there is require and require-dev field in the composer.JSON i included gii in both of them and each one separately with no luck.
i also tried getting the template through composer, and while installing i saw gii as installed, but still could not get it to work.
this is where i got my Yii template: https://github.com/yiisoft/yii2-app-advanced
Like described in the Docs you have to adjust the allowed IPs in the /frontend/config/main-local.php:
If you have modified your /frontend/config/main.php like this for pretty URLs:
You can call gii with the URL
(Having yourVM.local point to your Frontend Module in your Hosts file.)
I had to comment out the urlManager element (disabling pretty Urls) in 'components' in the relevant config file (actually commented out by default).
Before disabling pretty Urls I could load the Gii page, but when attemtping to load any of the generator pages (Controller, Model, etc.) I was redirected to the home page.
Step 1: Add Following line to required-dev of composer.json
Step 2: Update your composer. Step 3: Add Following line to your frontend/config/main.php file. Don't incude these ..........
Step 4: If you have enabled your clean url then go to
if not then go to
You can follow the link yii2_gii
Also, try this if
gii
still does not work:This should be well documented by the yii team!
After I used the
init
command, in/frontend/config/main-local.php
, I found:My app is in
dev
mode, and te above declaration, stops mygii
to work, so ... comment that lineThis is how to get Gii working from a remote server for an advanced setup template.
In the frontend config file. For example:
Add the following code:
The interesting part is the Gii
array
which has been modified.