Yii 2 gii is generating view files on different directory

I solved similar problem by changing

backend\modules\settings\views\companies

into

@backend/modules/settings/views/companies

Hopefully it helps someone in future


You missed one final folder and alias in View Path. It should be @backend\modules\settings\views\companies.

As you can see in creation log, the generated files are in wrong place (root views folder), that's why the error is thrown.


Have the same problem. Solved entering @backend/modules/settings/views/companies instead backend\modules\settings\views\companies. See on slashes.