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.

19 lines
598 B

  1. <?php
  2. /** @var Factory $factory */
  3. use App\Business;
  4. use Illuminate\Support\Str;
  5. use Faker\Generator as Faker;
  6. use Illuminate\Database\Eloquent\Factory;
  7. $factory->define(Business::class, function (Faker $faker) {
  8. return [
  9. 'name' => $name = $faker->unique()->company,
  10. 'slug' => Str::slug($name) . $faker->numberBetween(1, 100),
  11. 'wallet' => random_int(111111, 999999),
  12. 'slug' => Str::slug($name) . $faker->numberBetween(1, 100),
  13. 'color' => $faker->colorName,
  14. 'calculated_at' => \Carbon\Carbon::now()->subMinutes(random_int(1, 1000)),
  15. ];
  16. });