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.
 
 

17 lines
490 B

<?php
/** @var Factory $factory */
use App\Models\Business;
use Illuminate\Support\Str;
use Faker\Generator as Faker;
$factory->define(Business::class, function (Faker $faker) {
return [
'name' => $name = $faker->unique()->company,
'slug' => Str::slug($name) . $faker->numberBetween(1, 100),
'wallet' => random_int(111111, 999999),
'color' => $faker->colorName,
'calculated_at' => \Carbon\Carbon::now()->subDays(random_int(1, 31)),
];
});