CountryModelFactory.php 842 B

123456789101112131415161718192021222324252627
  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. use App\Shop\Countries\Country;
  14. $factory->define(Country::class, function (Faker\Generator $faker) {
  15. return [
  16. 'name' => $faker->unique()->country,
  17. 'iso' => $faker->unique()->countryISOAlpha3,
  18. 'iso3' => $faker->unique()->countryISOAlpha3,
  19. 'numcode' => $faker->randomDigit,
  20. 'phonecode' => $faker->randomDigit,
  21. 'status' => 1
  22. ];
  23. });