]> BookStack Code Mirror - bookstack/blobdiff - app/Entities/Models/Page.php
Merge branch 'prev-next-button' of https://github.com/shubhamosmosys/BookStack into...
[bookstack] / app / Entities / Models / Page.php
index 93fb218932cf6e9f2796fce7f3aaac8586c43490..888a0db33b09445afb5e5639322190d6dd903e1b 100644 (file)
@@ -138,4 +138,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;
+    }
 }