X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/8e78b4c43eb980f47d9c207a0ce3330699d54103..refs/pull/5721/head:/app/Entities/Models/Chapter.php diff --git a/app/Entities/Models/Chapter.php b/app/Entities/Models/Chapter.php index 422c82442..088d199da 100644 --- a/app/Entities/Models/Chapter.php +++ b/app/Entities/Models/Chapter.php @@ -60,6 +60,7 @@ class Chapter extends BookChild /** * Get the visible pages in this chapter. + * @returns Collection */ public function getVisiblePages(): Collection { @@ -69,13 +70,4 @@ class Chapter extends BookChild ->orderBy('priority', 'asc') ->get(); } - - /** - * Get a visible chapter by its book and page slugs. - * @throws \Illuminate\Database\Eloquent\ModelNotFoundException - */ - public static function getBySlugs(string $bookSlug, string $chapterSlug): self - { - return static::visible()->whereSlugs($bookSlug, $chapterSlug)->firstOrFail(); - } }