Laravel running migrations on "app/database/migrations" folder recursively

The only way to do it right now is to manually go through all the migrations. That is, you have to run the migration command on each of your subfolders:

php artisan migrate --path=/app/database/migrations/relations  
php artisan migrate --path=/app/database/migrations/translations

However, what you can do is easily extend the artisan system to write your own migrate command that will iterate through all folders under the migrations folder, create these commands for you and run them.

You can also simply write a shell script if you don't want to get into doing this via artisan

Edit: for Laravel >= 5.0, the correct commands to migrate migration files in sub directories would be:

php artisan migrate --path=/database/migrations/relations
php artisan migrate --path=/database/migrations/translations


This add to boot method in AppServiceProvider

$mainPath = database_path('migrations');
$directories = glob($mainPath . '/*' , GLOB_ONLYDIR);
$paths = array_merge([$mainPath], $directories);

$this->loadMigrationsFrom($paths);

Now you use can php artisan migrate and also php artisan migrate:back


You can also use a wildcard, like so:

php artisan migrate --path=/database/migrations/*