0
0
Fork 0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-05-21 23:38:39 +00:00

Added indexes, Reduced queries on pages

This commit is contained in:
Dan Brown 2015-11-26 23:45:04 +00:00
parent 3825ea8c14
commit 22f8a408fa
19 changed files with 319 additions and 48 deletions
app/Http/Controllers

View file

@ -80,8 +80,9 @@ class ChapterController extends Controller
{
$book = $this->bookRepo->getBySlug($bookSlug);
$chapter = $this->chapterRepo->getBySlug($chapterSlug, $book->id);
$sidebarTree = $this->bookRepo->getChildren($book);
Views::add($chapter);
return view('chapters/show', ['book' => $book, 'chapter' => $chapter, 'current' => $chapter]);
return view('chapters/show', ['book' => $book, 'chapter' => $chapter, 'current' => $chapter, 'sidebarTree' => $sidebarTree]);
}
/**