*/ class BlockFactory extends Factory { public function definition(): array { return [ 'publication_id' => \App\Models\Publication::factory(), 'type' => 'rich_text', 'content' => ['content' => '

' . implode('

', $this->faker->paragraphs(3)) . '

'], 'order' => 0, ]; } public function image(): static { return $this->state([ 'type' => 'image', 'content' => [ 'url' => 'https://picsum.photos/1200/630', 'alt' => $this->faker->sentence(4), 'caption' => $this->faker->sentence(), 'style' => $this->faker->randomElement(['full', 'contained', 'float-left', 'float-right']), ], ]); } }