]>
BookStack Code Mirror - bookstack/blobdiff - app/Entities/Models/Page.php
projects
/
bookstack
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Merge branch 'prev-next-button' of https://github.com/shubhamosmosys/BookStack into...
[bookstack]
/
app
/
Entities
/
Models
/
Page.php
diff --git
a/app/Entities/Models/Page.php
b/app/Entities/Models/Page.php
index 93fb218932cf6e9f2796fce7f3aaac8586c43490..888a0db33b09445afb5e5639322190d6dd903e1b 100644
(file)
--- a/
app/Entities/Models/Page.php
+++ b/
app/Entities/Models/Page.php
@@
-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;
+ }
}