Skip to content
Advertisement

Target class [DatabaseSeedersUsersTableSeeder] does not exist

I am getting the error “Target class [DatabaseSeedersUsersTableSeeder] does not exist” and I cannot figure out why. I have already tried solutions posted to similar issues and none of them worked for me.

Here is my composer.json autoload/classmap settings

JavaScript

UsersTableSeeder class

JavaScript

DatabaseSeeder class

JavaScript

Advertisement

Answer

You are missing namespace in UsersTableSeeder class.

JavaScript

This will make autoloader to find the other seeder as they will be same namespace as DatabaseSeeder.

Note: run composer dump-autoload after that.

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement