Tengo este seeder con este nombre UserProfilesSeeder.php
El contenido es este
<?php
use Illuminate\Database\Seeder;
use Faker\Factory as Faker;
class UserProfilesSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
$faker = Faker::create();
for ($i = 0; $i < 50; $i++) {
\DB::table('users')->insert(array(
'name' => $faker->name,
'email' => $faker->email,
'password' => '1234'
));
\DB::table('user_profiles')->insert(array(
'user_id' => $i,
));
}
}
}
El archivo desde donde se llama el seeder DatabaseSeeder.php tiene esta estructura
<?php
use Illuminate\Database\Seeder;
class DatabaseSeeder extends Seeder
{
/**
* Seed the application's database.
*
* @return void
*/
public function run()
{
$this->call('UserProfilesSeeder');
}
}
El error que me da es que no encuentra la clase "UserProfilesSeeder"
php artisan db:seed
Seeding: UserProfilesSeeder
ReflectionException : Class UserProfilesSeeder does not exist
at C:\xampp\htdocs\api\vendor\laravel\framework\src\Illuminate\Container\Container.php:794
790| if ($concrete instanceof Closure) {
791| return $concrete($this, $this->getLastParameterOverride());
792| }
793|
794| $reflector = new ReflectionClass($concrete);
795|
796| // If the type is not instantiable, the developer is attempting to resolve
797| // an abstract type such as an Interface or Abstract Class and there is
798| // no binding registered for the abstractions so we need to bail out.