Laravel 5.0 php artisan make: model ModelName automatically creates a migration class

Laravel team: php artisan make: model ModelName

automatically creates a migration class with the model name. Is there a way to pass additional parameters to the make: model command so that it ignores the creation of the migration class?

+6
source share
1 answer

You should write this command:
php artisan make:model modelName --no-migration

The Artisan CLI provides a help message for all teams.
For example, php artisan help make:model shows a list of available cli arguments for the make:model command.

UPDATE [2015] :
Starting with 5.1, migrations are no longer automatically created. You can use the --migration flag to create it.

+13
source

Source: https://habr.com/ru/post/983310/


All Articles