抖音小程序

UserFactory.php 737B

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. 'password' => '$2y$10$TKh8H1.PfQx37YgCzwiKb.KjNyWgaHb9cbcoQgdIVFlYg7B77UdFm', // secret
  18. 'remember_token' => str_random(10),
  19. ];
  20. });