3 namespace Database\Factories\Entities\Models;
5 use Illuminate\Database\Eloquent\Factories\Factory;
6 use Illuminate\Support\Str;
8 class PageFactory extends Factory
11 * The name of the factory's corresponding model.
15 protected $model = \BookStack\Entities\Models\Page::class;
18 * Define the model's default state.
22 public function definition()
24 $html = '<p>' . implode('</p>', $this->faker->paragraphs(5)) . '</p>';
27 'name' => $this->faker->sentence,
28 'slug' => Str::random(10),
30 'text' => strip_tags($html),
31 'revision_count' => 1,