*/ class CityFactory extends Factory { /** * Define the model's default state. * * @return array */ public function definition(): array { $name = fake()->unique()->city(); return [ 'name' => $name, 'slug' => Str::slug($name).'-'.fake()->unique()->numberBetween(1, 9999), 'bounds_min_x' => -80, 'bounds_max_x' => 80, 'bounds_min_z' => -80, 'bounds_max_z' => 80, 'is_active' => false, 'expansions' => 0, ]; } }