Bob5421
Bob5421

Reputation: 9073

Laravel auto generate migration scripts

I am working on a php laravel webapp.

I am creating models for my database.

I have to write models class and migrations too.

Is there a way to only write model class and generate migration class automatically ?

Artisan is not able to detect changes in Model class ?

Thanks

Upvotes: 1

Views: 615

Answers (1)

Haris
Haris

Reputation: 111

You can simply generate Model with using

php artisan make:model model-name -m

parameter -m stands for auto create migration while you are creating model.

Upvotes: 0

Related Questions