I just start to learn laravel as an online course and do all instructions step by step behind the instructor but when I try to make migrate I get an error and doesn't migrate to database. what's wrong?
SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'users' already exists (SQL: create table
users
(id
int unsigned not null auto_increment primary key,name
varchar(255) not null,password
varchar(255) not null,remember_token
varchar(100) null,created_at
timestamp null,updated_at
timestamp null) default character set utf8mb4 collate utf8mb4_unicode_ci)
In Connection.php line 449:
SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'users' already exists
Go to your data base and delete the table users and then re-do : php artisan migrate
you need refresh your database this error becouse users table in your DB please Go to your terminal and run this commend
php artisan migrate:refresh
or go to your phpmyadmin and drop your tables on DB to run your migrations from scratch using this commend after drop your DB
php artisan migrate
congratulations ;)
enjoy :)