Laravel make model with migration

Sarvar Nishonboev picture Sarvar Nishonboev · Jul 31, 2015 · Viewed 79.1k times · Source

I'm creating a model on the Laravel 5 with this command:

php artisan make:model Settings

As it shows on the video lessons that as soon as model is created, new migration file also must be created. But, in my situtation, migration is not being created. How can I get the migration generated when model is created?

composer.json:

...
    "require": {
            "php": ">=5.5.9",
            "laravel/framework": "5.1.*"
        },
...

Answer

davsp picture davsp · Jul 31, 2015

I'm guessing your build of L5 is fairly old, as they disabled creating migrations alongside the model creation.

Try running the ff:

php artisan make:model Settings --migration