X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/7ba6962707788da3d61807db3818de0ef709510f..refs/pull/2511/head:/app/Entities/Models/Page.php diff --git a/app/Entities/Models/Page.php b/app/Entities/Models/Page.php index 739927aff..b60da0121 100644 --- a/app/Entities/Models/Page.php +++ b/app/Entities/Models/Page.php @@ -126,4 +126,13 @@ class Page extends BookChild $refreshed->html = (new PageContent($refreshed))->render(); return $refreshed; } + /** + * Get the parent chapter ID. + */ + public function getParentChapter() + { + $chapterId = $this->chapter()->visible() + ->get('id'); + return $chapterId; + } }