Back

Problems with migrations


In Laravel 5.0 I create a new model "php artisan make:model Product" and laravel's creates two files, the model Product and a migration file.

Today I updated Laravel to 5.1.10 and when I create the same model "php artisan make:model Product" just create a model, and NOT the migration file.

How I can fix this? This is a characteristics of Laravel 5.1?

KHIT93 replied 2 years ago Solution

The syntax has changed. You need to pass the migration flag to your artisan call.

php artisan make:model Product --migration

Sign in to participate in this thread!



We'd like to thank these amazing companies for supporting us