Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

PHP Laravel 4 Basics Laravel and Databases Migrations & Schema Builder

Matthew Bingham
Matthew Bingham
11,927 Points

migrate:make is not defined

This command:

php artisan migrate:make create_todo_lists_table --create=todo_lists

... results in the following error:

[InvalidArgumentException]
Command "migrate:make" is not defined.
Did you mean one of these?
    migrate:reset
    migrate:refresh
    migrate:status
    migrate:rollback
    migrate:install
    migrate

Help anyone?

3 Answers

Matthew Bingham
Matthew Bingham
11,927 Points

Never mind - I've just read the Laravel 5 docs and the following statement works:

php artisan make:migration create_todo_lists_table --create=todo_lists
  • Change migrate:make to make:migration

Awesome! FYI if you're not creating a new table you can pass in a flag of:

--table=todo_lists

I always find that helpful :)

Laracasts have created a really nice package that extends the laravel 5 generators. You canapply schema from the command line, as well as other cool things. Just follow the instructions on the github page!

Laravel 5 Extended Generators

I still had an error running php artisan migrate after running make:migration on laravel 5.6.

Fixed it by running php artisan migrate:fresh which gave me the following message:

Dropped all tables successfully. Migration table created successfully. Migrating: 2014_10_12_000000_create_users_table Migrated: 2014_10_12_000000_create_users_table Migrating: 2014_10_12_100000_create_password_resets_table Migrated: 2014_10_12_100000_create_password_resets_table Migrating: 2018_05_29_032031_create_todo_lists_table Migrated: 2018_05_29_032031_create_todo_lists_table