Solved – Laravel Target class [TableSeeder] does not exist

Today I am running php artisan db:seed I am getting the following error [ReflectionException] Class CountryTableSeeder does not exist and still shocked some time but I got the solution for reintizing the vendor files. php artisan seed class not found error occored when our vendor files not initialize sor we need to reinitialize them.

If you have same error just see the solution below for this [ReflectionException] Class CountryTableSeeder does not exist. I have this solution below:

Solution:

You need to run if you are running linux (ubuntu) you can use sudo before the command.

composer dump-autoload

Then

php artisan db:seed

Or

php artisan db:seed --class=CountryTableSeeder

That’s the solution if you have still issues just run the below commands.

php artisan cache:clear

Now the Laravel Artisan Seed Class CountryTableSeeder does not exist issue defenetily fixed. I hope this work for you..

Leave a Comment