You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
761 B

8 years ago
  1. <?php
  2. /*
  3. |--------------------------------------------------------------------------
  4. | Model Factories
  5. |--------------------------------------------------------------------------
  6. |
  7. | Here you may define all of your model factories. Model factories give
  8. | you a convenient way to create models for testing and seeding your
  9. | database. Just tell the factory how a default model should look.
  10. |
  11. */
  12. /** @var \Illuminate\Database\Eloquent\Factory $factory */
  13. $factory->define(App\User::class, function (Faker\Generator $faker) {
  14. static $password;
  15. return [
  16. 'name' => $faker->name,
  17. 'email' => $faker->unique()->safeEmail,
  18. 'password' => $password ?: $password = bcrypt('secret'),
  19. 'remember_token' => str_random(10),
  20. ];
  21. });