*/ class StaticPageFactory extends Factory { /** * Define the model's default state. * * @return array */ public function definition(): array { $title = fake()->unique()->words(rand(1, 2), true); return [ 'type' => \collect(StaticPageType::toArray())->random()->value, 'seo_title' => fake()->sentence(), 'seo_description' => fake()->sentence(), 'title' => $title, 'slug' => Str::slug($title), 'subtitle' => fake()->words(rand(1, 2), true), 'picture' => '', 'picture_alt' => fake()->sentence(), 'picture_title' => fake()->sentence(), 'content' => fake()->sentence(), 'data' => [], ]; } }