Error:

QueryException in Connection.php line 713: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'user.category_posts' doesn't exist (SQL: insert into category_posts (category_id, posts_id) values (4, ))
solution
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
.

I’m Abhishek, a DevOps, SRE, DevSecOps, and Cloud expert with a passion for sharing knowledge and real-world experiences. I’ve had the opportunity to work with Cotocus and continue to contribute to multiple platforms where I share insights across different domains:
-
DevOps School – Tech blogs and tutorials
-
Holiday Landmark – Travel stories and guides
-
Stocks Mantra – Stock market strategies and tips
-
My Medic Plus – Health and fitness guidance
-
TrueReviewNow – Honest product reviews
-
Wizbrand – SEO and digital tools for businesses
I’m also exploring the fascinating world of Quantum Computing.
[…] https://www.devopsconsulting.in/blog/how-to-fix-error-base-table-or-view-not-found/ […]
[…] How to fix error Base table or view not found […]
[…] How to fix error Base table or view not found […]