UserFactory.php 775 B

123456789101112131415161718192021222324
  1. <?php
  2. use Faker\Generator as Faker;
  3. /*
  4. |--------------------------------------------------------------------------
  5. | Model Factories
  6. |--------------------------------------------------------------------------
  7. |
  8. | This directory should contain each of the model factory definitions for
  9. | your application. Factories provide a convenient way to generate new
  10. | model instances for testing / seeding your application's database.
  11. |
  12. */
  13. $factory->define(App\User::class, function (Faker $faker) {
  14. return [
  15. 'name' => $faker->name,
  16. 'email' => $faker->unique()->safeEmail,
  17. 'email_verified_at' => now(),
  18. 'password' => '$2y$10$TKh8H1.PfQx37YgCzwiKb.KjNyWgaHb9cbcoQgdIVFlYg7B77UdFm', // secret
  19. 'remember_token' => str_random(10),
  20. ];
  21. });