Answers for "sqlstate[42s02]: base table or view not found: 1146 table laravel 8 site:stackoverflow.com"

SQL
0

SQLSTATE[42S02]: Base table or view not found: 1146 Table many to many in laravel

seem i got the solution without change table name
  if u have bookmarks table name
    public function products() {
      return $this->belongsToMany(Product::class, 'bookmarks');
 }
Posted by: Guest on December-14-2021
0

SQLSTATE[42S02]: Base table or view not found: 1146 Table many to many in laravel

Ur answer absolutly right Famous Frog, but for case like favorites table or whithlisttable has many to many, how to solve those?
Posted by: Guest on December-14-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: 1146 table laravel 8 site:stackoverflow.com"

Code answers related to "SQL"

Browse Popular Code Answers by Language