Laravel make model with migration
2020 update:
You can now do:
php artisan make:model ModelName -a
To create a:
- model
- controller
- seeder
- migration
- factory
All using one command.
Also you can use this command:
php artisan make:model ModelName -m
and if you wanna make controller for your model, you should write this command :
php artisan make:model ModelName -mc
// or
php artisan make:model ModelName -mcr //(r: for resource methods)
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
Try using this Command
php artisan make:model ModelName -m
OR
php artisan make:model ModelName --migration
It will create model with migration class