How to run a laravel package's migrations


June 2014.

Problem


Let's say you fetched a laravel package using composer and whatever, and you want to run its migration files (to have it create its tables for instance).

# php artisan migrate
Nothing to migrate.

Hum, laravel won't find anything to migrate.

Solution


The trick is to give artisan the path containing the migration files:


# php artisan migrate --path=vendor/vendorname/package-name/src/migrations
Migrated: 2013_11_21_000001_create_something
Migrated: 2013_11_21_000002_create_something_else
Migrated: 2014_03_21_000003_add_stuff