Error handling 如何修复&x201C;方法\Database\Schema\Blueprint::number不存在;
当我使用php artisan migrate时,我收到此消息。有人能帮我吗?我在网上搜索,但没有找到任何对我有帮助的东西。(我是拉雷维尔的新手) 我的桌子:Error handling 如何修复&x201C;方法\Database\Schema\Blueprint::number不存在;,error-handling,laravel-7,artisan-migrate,Error Handling,Laravel 7,Artisan Migrate,当我使用php artisan migrate时,我收到此消息。有人能帮我吗?我在网上搜索,但没有找到任何对我有帮助的东西。(我是拉雷维尔的新手) 我的桌子: <?php }`尝试更改$table->id();到$table->increments('id');它可能是.env文件中错误的MySQL端口号。检查您的.env文件,确保端口号与MySQL使用的端口号匹配。我已经尝试过了,但无法解决问题。我还使用了$table->increments('id');而不是$table->id()
<?php
}`尝试更改$table->id();到$table->increments('id');它可能是.env文件中错误的MySQL端口号。检查您的.env文件,确保端口号与MySQL使用的端口号匹配。我已经尝试过了,但无法解决问题。我还使用了$table->increments('id');而不是$table->id();但是我仍然得到了相同的错误;到$table->increments('id');它可能是.env文件中错误的MySQL端口号。检查您的.env文件,确保端口号与MySQL使用的端口号匹配。我已经尝试过了,但无法解决问题。我还使用了$table->increments('id');而不是$table->id();但我还是犯了同样的错误。
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('srooms', function (Blueprint $table) {
$table->id();
$table->string('room_two');
$table->string('room_three');
$table->string('room_four');
$table->string('room_five');
$table->string('room_six');
$table->string('room_seven');
$table->string('room_eight');
$table->string('room_nine');
$table->string('room_ten');
$table->string('room_eleven');
$table->string('room_twelve');
$table->softDeletes();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('srooms');
}