]> BookStack Code Mirror - bookstack/blobdiff - app/Http/Controllers/BookController.php
Added indexes, Reduced queries on pages
[bookstack] / app / Http / Controllers / BookController.php
index 682fc5415568ec3e81efbbe318f3da81b085625d..c4173730dde2db26f74b29ef74e961a8addf462d 100644 (file)
@@ -89,7 +89,8 @@ class BookController extends Controller
     {
         $book = $this->bookRepo->getBySlug($slug);
         Views::add($book);
-        return view('books/show', ['book' => $book, 'current' => $book]);
+        $bookChildren = $this->bookRepo->getChildren($book);
+        return view('books/show', ['book' => $book, 'current' => $book, 'bookChildren' => $bookChildren]);
     }
 
     /**