Answers for "SQLSTATE[42S02]: Base table or view not found migration"

PHP
0

php artisan migrate SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'password_resets' already exists

if(!Schema::hasTable('users')){
    Schema::create('users', function (Blueprint $table) {
        $table->increments('id');
        $table->string('name');
        $table->string('email')->unique();
        $table->string('password');
        $table->rememberToken();
        $table->timestamps();
        });
  } 
      above see this condition and save this and run php artisan migrate
 command and your table show in db
Posted by: Guest on July-07-2021
0

SQLSTATE[42S02]: Base table or view not found: 1146 Tabl

It seems Laravel is trying to use category_posts table (because of many-to-many relationship). But you don't have this table, because you've created category_post table. Change name of the table to category_posts.
Posted by: Guest on December-07-2020

Code answers related to "SQLSTATE[42S02]: Base table or view not found migration"

Browse Popular Code Answers by Language