mirror of
https://github.com/BookStackApp/BookStack.git
synced 2024-11-23 15:21:06 +08:00
Removed comments from seeder since they are not used by tests
This commit is contained in:
parent
621142a46e
commit
fd449582bd
|
@ -18,14 +18,10 @@ class DummyContentSeeder extends Seeder
|
||||||
|
|
||||||
factory(\BookStack\Book::class, 20)->create(['created_by' => $user->id, 'updated_by' => $user->id])
|
factory(\BookStack\Book::class, 20)->create(['created_by' => $user->id, 'updated_by' => $user->id])
|
||||||
->each(function($book) use ($user) {
|
->each(function($book) use ($user) {
|
||||||
$chapters = factory(\BookStack\Chapter::class, 5)->create(['created_by' => $user->id, 'updated_by' => $user->id])
|
$chapters = factory(\BookStack\Chapter::class, 5)->create(['created_by' => $user->id, 'updated_by' => $user->id])->each(function($chapter) use ($user, $book) {
|
||||||
->each(function($chapter) use ($user, $book){
|
$pages = factory(\BookStack\Page::class, 5)->create(['created_by' => $user->id, 'updated_by' => $user->id, 'book_id' => $book->id]);
|
||||||
$pages = factory(\BookStack\Page::class, 5)->create(['created_by' => $user->id, 'updated_by' => $user->id, 'book_id' => $book->id])->each(function($page) use ($user) {
|
$chapter->pages()->saveMany($pages);
|
||||||
$comments = factory(\BookStack\Comment::class, 3)->make(['created_by' => $user->id, 'updated_by' => $user->id, 'page_id' => $page->id]);
|
});
|
||||||
$page->comments()->saveMany($comments);
|
|
||||||
});
|
|
||||||
$chapter->pages()->saveMany($pages);
|
|
||||||
});
|
|
||||||
$pages = factory(\BookStack\Page::class, 3)->make(['created_by' => $user->id, 'updated_by' => $user->id]);
|
$pages = factory(\BookStack\Page::class, 3)->make(['created_by' => $user->id, 'updated_by' => $user->id]);
|
||||||
$book->chapters()->saveMany($chapters);
|
$book->chapters()->saveMany($chapters);
|
||||||
$book->pages()->saveMany($pages);
|
$book->pages()->saveMany($pages);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user