架构生成器 Laravel 4 中的大整数

Mar*_*zle 2 biginteger laravel laravel-4

如何使用 Laravel 4 中的架构生成器在表行中执行大整数类型。

谢谢大家。

Ant*_*iro 5

bigInteger() 存在于 Laravel 4 的 Schema Builder 中,因此您的迁移应该如下所示:

public function up()
{
    Schema::create('users', function($table)
    {
        $table->increments('id');

        $table->bigInteger('human_lives');
    });
}
Run Code Online (Sandbox Code Playgroud)