]> BookStack Code Mirror - bookstack/blobdiff - app/Repos/PageRepo.php
Started working on chapters
[bookstack] / app / Repos / PageRepo.php
index 0e2f136be18ad6dd40f6f9e01ab60f6b28dc2746..897c9ff7707a4c9026465e2f3bff868d8a8d7b92 100644 (file)
@@ -114,7 +114,7 @@ class PageRepo
      */
     private function getTopLevelPages($bookId)
     {
-        return $this->page->where('book_id', '=', $bookId)->where('page_id', '=', 0)->orderBy('priority')->get();
+        return $this->page->where('book_id', '=', $bookId)->where('chapter_id', '=', 0)->orderBy('priority')->get();
     }
 
     /**