]> BookStack Code Mirror - bookstack/blobdiff - app/Entities/Repos/PageRepo.php
Merge branch 'prev-next-button' of https://github.com/shubhamosmosys/BookStack into...
[bookstack] / app / Entities / Repos / PageRepo.php
index 5eb882a026a3f803369b56b06b6334c46e8773c9..651548885a815fca2c7853974f5f27926b8d2be8 100644 (file)
@@ -468,4 +468,10 @@ class PageRepo
             ->where('page_id', '=', $page->id)
             ->orderBy('created_at', 'desc');
     }
+    /**
+     * Get page details by chapter ID.
+     */
+    public function getPageByChapterID(int $id){
+        return Page::visible()->where('chapter_id', '=', $id)->get(['id','slug']);
+    }
 }