Laravel 4 and 5 Migrations Organiser
The number of migrations in any sized project can quickly become huge, and although they are ordered, having one big list can sometimes be inconvenient and slow to navigate.
This package will put your migrations in
yyyy/mm folders e.g.
- Laravel 4.2 (1.0 branch)
- Laravel 5.0 (2.0 branch)
- Laravel 5.1/5.2 (3.0 branch)
- Laravel 5.3/5.4/5.5/5.6 (master branch - this branch)
composer require jaybizzle/laravel-migrations-organiser 4.* or add
"jaybizzle/laravel-migrations-organiser": "4.*" to your
Add the following to the
providers array in your
Laravel ^5.5 uses Package Auto-Discovery, so doesn't require you to manually add the ServiceProvider
This package hooks into the default
artisan make:migration command. Just use that as you normally would and the package takes care of the rest.
What if I have already created migrations
No problem, just run
artisan migrate:organise and your migrations will be moved into the relevant
I want my migrations back to how they were
Again, no problem. Running
artisan migrate:disorganise will move all migrations from the
yyyy/mm folder structure into the base migrations folder. Add the
--force option to delete left over folders without confirmation.