I have that error, since i create a UserFactory and in my UserTableSeeder add this line factory(App\User::class,10)->create(); here a picture
In my UserTableSeeder i replace factory(App\User::class,10)->create(); by this \App\Models\User::factory()->count(10)->create();
In my UserFactory i replace 'username' => $faker->name, by this'username' => $this->faker->text(10) no results
Thank you for your help
In your model
User.phpIn your seeder:
Additionally, you are confused about using
appinsteadAppfor your namespace declaration because the app folder is in lowercase, but you need to seecomposer.jsonfile and you will find this lines:The app folder is parsed as
Appnamespace, so you need allways usenamespace App\...in in declarations, and\ApporAppin the uses.