]> BookStack Code Mirror - bookstack/blobdiff - app/Repos/PageRepo.php
Vastly improved design
[bookstack] / app / Repos / PageRepo.php
index 209e2816bd15c52264d0d9349898168144c0b7c2..62fbe9d8f18947aab2457d2ab8945d6779605c6e 100644 (file)
@@ -27,9 +27,9 @@ class PageRepo
         return $this->page->all();
     }
 
-    public function getBySlug($slug)
+    public function getBySlug($slug, $bookId)
     {
-        return $this->page->where('slug', '=', $slug)->first();
+        return $this->page->where('slug', '=', $slug)->where('book_id', '=', $bookId)->first();
     }
 
     public function newFromInput($input)