Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Target class [UsersTableSeeder] does not exist

I am using laravel latest version 7.

When I run php artisan db:seed I am getting the following error:

Illuminate\Contracts\Container\BindingResolutionException

Target class [UsersTableSeeder] does not exist.
like image 623
Akshay Avatar asked Apr 29 '26 04:04

Akshay


1 Answers

After writing your seeder, you have to run composer dump-autoload

Make sure that you have this code in your composer.json:

"autoload": {
    "classmap": [
      "database"
    ],
}
like image 77
user14314214 Avatar answered May 03 '26 20:05

user14314214



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!