*/ class UserFactory extends Factory { /** * The name of the factory's corresponding model. * * @var string */ protected $model = User::class; /** * Define the model's default state. * * @return array */ public function definition(): array { return [ 'name' => $this->faker->name, 'password' => bcrypt('password'), 'remember_token' => Str::random(10), ]; } }