laravel Table ‘users‘ already exists

标题报错如下图

在这里插入图片描述

标题解决方案:

1
2
3
4
5
6
7
8
9
10
11
12
public function up()
{
Schema::dropIfExists('users');//增加这一条语句,即可解决问题
Schema::create('users', function (Blueprint $table) {
$table->id();
$table->string('name');
$table->string('email')->unique();
$table->timestamp('email_verified_at')->nullable();
$table->string('password');
$table->rememberToken();
$table->timestamps();
});