Laravel 5.5 Error Base table or view already exists: 1050 Table 'users' already exists
I Solved My Problem Myself by Changing My create_users_table.php
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateUsersTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::dropIfExists('users');
Schema::create('users', function (Blueprint $table) {
$table->increments('id');
$table->string('name');
$table->string('email')->unique();
$table->string('password');
$table->rememberToken();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('users');
}
}
Here are the steps I took to solve the same issue:
In the console I wrote
php artisan tinker
Then, again in the console,
Schema::drop('users')
At the end
php artisan migrate
and it all worked.
Following command solved my problem:
1. php artisan tinker
2. Schema::drop('your_table_name')
3. php artisan migrate