Why does this error occur? (ReflectionException : Class CountrySeeder does not exist)
Mainly for two reasons:
First Reason:– Either, we haven’t created seeder file.
Solution
Step 1. So, Create seeder file by this following command:-
php artisan make:seeder CountriesTableSeeder
Step 2. Now, Run the Seeder class individually into database
php artisan db:seed --class=CountrySeeder
Second Reason:- Or, we haven’t added the seeder file into the database/seeds/DatabaseSeeder.php file.
Solution
Step 1. Add this within the run function.
$this->call(CountriesTableSeeder::class);
public function run()
{
$this->call(UsersTableSeeder::class);
$this->call(RolesTableSeeder::class);
$this->call(CountriesTableSeeder::class);
$this->call(StatesTableSeeder::class);
}
Thanks
With MotoShare.in, you can book a bike instantly, enjoy doorstep delivery, and ride without worries. Perfect for travelers, professionals, and adventure enthusiasts looking for a seamless mobility solution.