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💻

Top comments (0)