I want create an installation controller for my web app and for config db need run migration commands from controller.
For example when user visit
localhost/backend/webapp/index.php?install/step1
by action step1 run migrate up and down command and do installation.
Thanks from @soju and @meysam you can use both solutions.
exec
:Perhaps combining stackoverflow.com/a/35864018/1592247 and exec function of php could helps (@meysam)
How can I call a console command in web application in Yii 2.0 (@soju)
Both way may help you. be aware using exec may cause some security issues and disable in some servers.