Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Laravel 5.0 php artisan make:model ModelName auto creating migration class

Laravel's command: php artisan make:model ModelName

automatically creating creating migration class with the Model Name. Is there are way that we could pass additional parameters to the make:model command so that it ignores creating migration class?

like image 703
user1404963 Avatar asked Mar 04 '15 11:03

user1404963


1 Answers

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

Artisan CLI providers a help message for all commands.
For instance php artisan help make:model shows a list of available cli arguments for the make:model command.

UPDATE [2015]:
Starting 5.1, migrations are not automatically created anymore. You can use the flag --migration to generate one.

like image 93
Jad Joubran Avatar answered Sep 20 '22 14:09

Jad Joubran