📌  相关文章
📜  如何通过迁移在 larevel 中添加新列 - PHP 代码示例

📅  最后修改于: 2022-03-11 14:54:42.558000             🧑  作者: Mango

代码示例2
php artisan make:migration add_paid_to_users_table --table=users


public function up()
{
    Schema::table('users', function($table) {
        $table->integer('paid');
    });
}
and don't forget to add the rollback option:

public function down()
{
    Schema::table('users', function($table) {
        $table->dropColumn('paid');
    });
}