How to use artisan make: migration in a subdirectory with Laravel 5

1

I'm starting to build an extremely robust application using laravel 5 and I need to organize all my tables migration codes. My solution was to structure subfolders to make it easier to understand and modularize this application. The problem is that I can not create my migrations within the migrations subdirectories.

What I'm looking for is something like this:

php artisan make:migration Foo/create_table_foo
php artisan make:migration Foo/upgrade_table_foo

The problem is that I can not generate this type of structure, by doing this artisan inserts the date in the folder name and says that it could not find the directory. How to solve?

    
asked by anonymous 28.11.2016 / 17:13

1 answer

1

I found a straightforward solution in the documentation. I should use the --path method telling which directory the migrations will be saved. So:

php artisan make:migration create_table_foo --path=database/migrations/Foo
    
28.11.2016 / 17:18