Add a new column to existing table in a migration

前端 未结 12 2657
离开以前
离开以前 2020-11-28 17:09

I can\'t figure out how to add a new column to my existing database table using the Laravel framework.

I tried to edit the migration file using...



        
12条回答
  •  感动是毒
    2020-11-28 17:47

    If you're using Laravel 5, the command would be;

    php artisan make:migration add_paid_to_users
    

    All of the commands for making things (controllers, models, migrations etc) have been moved under the make: command.

    php artisan migrate is still the same though.

提交回复
热议问题