]> BookStack Code Mirror - bookstack/blobdiff - database/factories/ModelFactory.php
Added migration file.
[bookstack] / database / factories / ModelFactory.php
index 43e2143868dd0c48ecc83d45cf53837d180111bb..b03e34b9b9c63d0a4f05edc687366582ff6ba894 100644 (file)
@@ -43,7 +43,8 @@ $factory->define(BookStack\Page::class, function ($faker) {
         'name' => $faker->sentence,
         'slug' => str_random(10),
         'html' => $html,
-        'text' => strip_tags($html)
+        'text' => strip_tags($html),
+        'revision_count' => 1
     ];
 });
 
@@ -69,4 +70,14 @@ $factory->define(BookStack\Image::class, function ($faker) {
         'type' => 'gallery',
         'uploaded_to' => 0
     ];
+});
+
+$factory->define(BookStack\Comment::class, function($faker) {
+    $text = $faker->paragraph(3);
+    $html = '<p>' . $text. '</p>';
+    return [
+        'html' => $html,
+        'text' => $text,
+        'active' => 1
+    ];
 });
\ No newline at end of file