Merge branch 'prev-next-button' of https://github.com/shubhamosmosys/BookStack into shubhamosmosys-prev-next-button

This commit is contained in:
Dan Brown
2021-05-26 22:13:19 +01:00
6 changed files with 90 additions and 1 deletions

View 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']);
}
}