Php 在迁移期间使列成为默认值在laravel 5.5中不起作用

Php 在迁移期间使列成为默认值在laravel 5.5中不起作用,php,mysql,laravel,migration,schema,Php,Mysql,Laravel,Migration,Schema,在迁移期间,我尝试将“is_img”列设置为默认值“0”。当我尝试像-$table->integer('is_img')->defalut(0)->change()这样的操作时它正在迁移期间删除现有列。当尝试without change()方法时,它在迁移过程中会给出null值。迁移期间,我应该如何保持列的默认值?这是下面的模式- public function up() { Schema::create('admins', function (Blueprint $table) {

在迁移期间,我尝试将“is_img”列设置为默认值“0”。当我尝试像-
$table->integer('is_img')->defalut(0)->change()这样的操作时它正在迁移期间删除现有列。当尝试without change()方法时,它在迁移过程中会给出null值。迁移期间,我应该如何保持列的默认值?这是下面的模式-

public function up()
{
    Schema::create('admins', function (Blueprint $table) {
        $table->increments('id');
        $table->string('email');
        $table->string('user_name');
        $table->string('password');
        $table->string('login_type');
        $table->integer('is_img')->defalut(0)->change();
        $table->timestamps();
    });
}

您在这行有一个输入错误:

$table->integer('is_img')->defalut(0)->change();
应该是
default(0)
not
default(0)

尝试:
$table->integer('is\img')->dafault(0)->change()