DEV Community

Cover image for Database Query Exception base table or view not faund:1146 (Solution)
Osman Forhad
Osman Forhad

Posted on

Database Query Exception base table or view not faund:1146 (Solution)

Recently I was working with a project where I need to working with seed data for database dummy data. For this purpose, first I was creating a seed file by using below command:
php artisan make:seed MailboxFolderSeeder

this command creates a php file with this specific class name. after that I modify this class as I need.
After modify everything I go to seed this file foe that I was run below command:

php artisan db:seed --class=MailboxFolderSeeder

after running this command my terminal show me an error like below screen shot.
Alt Text
At this time, I was thinking what wrong actually I did. So, I read hole error alert and I got what was my mistake. Oh, it’s really funny I was missing database table correct spelling. The table name was mailbox_folders not mailbox_folder. So, I correct it and again run
php artisan db:seed --class=MailboxFolderSeeder
this command. And now it’s shows me success message like below screenshot
Alt Text
thats it.
.
Happy Coding.
osman forhad
Mobile & Web Application Developer💻

AWS GenAI LIVE image

Real challenges. Real solutions. Real talk.

From technical discussions to philosophical debates, AWS and AWS Partners examine the impact and evolution of gen AI.

Learn more

Top comments (0)

Qodo Takeover

Introducing Qodo Gen 1.0: Transform Your Workflow with Agentic AI

Rather than just generating snippets, our agents understand your entire project context, can make decisions, use tools, and carry out tasks autonomously.

Read full post

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay