我想写一个 Laravel Migration 自动增量 ID 作为主键。我想用另一个值而不是 1 来启动此 ID。我该怎么做?
迁移up()函数:
public function up()
{
Schema::create('users', function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('name');
$table->string('email')->unique();
$table->string('phone');
$table->rememberToken();
$table->timestamps();
});
}
Run Code Online (Sandbox Code Playgroud)