“Sqlstate [42S02]: tabla base o vista no encontrada: 1146 tabla muchos a muchos en laravel” Código de respuesta

Sqlstate [42S02]: tabla base o vista no encontrada: 1146 tabla muchos a muchos en 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');
 }
Elegant Echidna

Sqlstate [42S02]: tabla base o vista no encontrada: 1146 tabla muchos a muchos en laravel

Ur answer absolutly right Famous Frog, but for case like favorites table or whithlisttable has many to many, how to solve those?
Elegant Echidna

Sqlstate [42S02]: tabla base o vista no encontrada: 1146 TAB

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.
Famous Frog

Respuestas similares a “Sqlstate [42S02]: tabla base o vista no encontrada: 1146 tabla muchos a muchos en laravel”

Preguntas similares a “Sqlstate [42S02]: tabla base o vista no encontrada: 1146 tabla muchos a muchos en laravel”

Más respuestas relacionadas con “Sqlstate [42S02]: tabla base o vista no encontrada: 1146 tabla muchos a muchos en laravel” en PHP

Explore las respuestas de código populares por idioma

Explorar otros lenguajes de código