4 |--------------------------------------------------------------------------
6 |--------------------------------------------------------------------------
8 | Here you may define all of your model factories. Model factories give
9 | you a convenient way to create models for testing and seeding your
10 | database. Just tell the factory how a default model should look.
14 $factory->define(BookStack\User::class, function ($faker) {
16 'name' => $faker->name,
17 'email' => $faker->email,
18 'password' => str_random(10),
19 'remember_token' => str_random(10),
23 $factory->define(BookStack\Book::class, function ($faker) {
25 'name' => $faker->sentence,
26 'slug' => str_random(10),
27 'description' => $faker->paragraph
31 $factory->define(BookStack\Chapter::class, function ($faker) {
33 'name' => $faker->sentence,
34 'slug' => str_random(10),
35 'description' => $faker->paragraph
39 $factory->define(BookStack\Page::class, function ($faker) {
40 $html = '<p>' . implode('</p>', $faker->paragraphs(5)) . '</p>';
42 'name' => $faker->sentence,
43 'slug' => str_random(10),
45 'text' => strip_tags($html)