Support the ongoing development of Laravel.io →
Configuration Database Eloquent

Hi Guy:

When i create a model, for some reasons artisan also create Migration files. see below

ubuntu@ip-22:~/html/my-app$ php artisan make:model Test
Model created successfully.
Created Migration: 2015_03_29_204930_create_tests_table

why this is happening? This really mass up the migration files, because this will create a same table again. any help would be great!

Last updated 3 years ago.
0

In L5 early stages, the artisan make:model command received the feature of creating a migration.

In order to create only the model use the following command:

php artisan make:model Test --no-migration

You can find this in Illuminate\Foundation\Console\ModelMakeCommand in the fire method

0

Thank you for your awesome reply

0

Sign in to participate in this thread!

Eventy

Your banner here too?

zerogpm zerogpm Joined 16 Mar 2015

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.