3 namespace Database\Factories\Entities\Models;
5 use BookStack\Entities\Tools\PageEditorType;
6 use Illuminate\Database\Eloquent\Factories\Factory;
7 use Illuminate\Support\Str;
9 class PageFactory extends Factory
12 * The name of the factory's corresponding model.
16 protected $model = \BookStack\Entities\Models\Page::class;
19 * Define the model's default state.
21 public function definition(): array
23 $html = '<p>' . implode('</p>', $this->faker->paragraphs(5)) . '</p>';
26 'name' => $this->faker->sentence(),
27 'slug' => Str::random(10),
29 'text' => strip_tags($html),
30 'revision_count' => 1,
31 'editor' => 'wysiwyg',