How to open the console in yii2? I want to run a team

php yii migrate --migrationPath=@yii/rbac/migrations/ 

to create RBAC tables in the database.

I try to call yii.bat in the root directory of the application, but the console closes instantly (I’m doing something wrong).

  • PHP variable is not declared in Windows. - user206061

1 answer 1

in yii there is no command line console, you need to use win + r there cmd then cd disk: // path / to yii / enter and then your team will be happy