How to specify folder for laravel migrations?

Veljko Sirovljević picture Veljko Sirovljević · Mar 6, 2019 · Viewed 8.3k times · Source

I am trying to put laravel migrations in database sub folder, but not sure how to do this.

Answer

Liam Hammett picture Liam Hammett · Mar 6, 2019

When creating new migrations and executing your migrations, you can pass in a path parameter through the command line interface to specify the directory it will use to create and run the migrations respectively.

php artisan make:migration create_users_table --path=/path/to/your/migration/directory

php artisan migrate --path=/path/to/your/migration/directory