Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

vishalm's avatar

I want to run 'php artisan migrate' command through coding process

I want to run 'php artisan migrate' command through coding process. for that I have used command - 'php artisan migrate --database=$this->{self::COLUMN_DATABASE_NAME} --path=database/migrations/SymfonyMigrations'. now I want to pass root directory of my project to this command. how can I achieve that?

0 likes
2 replies
Snapey's avatar

knowing why would produce a better answer

Please or to participate in this conversation.