SQLSTATE[42S02]: Base table or view not found: 1146 Table 'matica.shopping_carts' doesn't exist (SQL: insert into `shopping_carts` (`status`, `updated_at`, `created_at`) values (incompleted, 2021-05-31 20:33:04, 2021-05-31 20:33:04)) code example

Example: 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.

Tags:

Php Example