Why does creating the model not create Migration for me?

Asked

Viewed 878 times

2

I’m starting at Laravel 5 and then this tutorial.

By creating the model

php artisan make:model Tarefa

he does not create me to Migration in database/migrations/ as it would be supposed, someone knows the reason?

1 answer

2


According to the documentation of the Laravel, you need to pass the argument --migration or -m in that command:

If you would like to generate a database Migration when you generate the model, you may use the --migration or -m option:

php artisan make:model User --migration

php artisan make:model User -m

That way Migration will be created.

  • It’s the harm of going to Soen first and not go to the official documentation. Thank you.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.