X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/70bfebcd7c9396c9d17757ec57a584371dce2e9f..refs/pull/5721/head:/app/Entities/Models/Chapter.php diff --git a/app/Entities/Models/Chapter.php b/app/Entities/Models/Chapter.php index d3a710111..088d199da 100644 --- a/app/Entities/Models/Chapter.php +++ b/app/Entities/Models/Chapter.php @@ -11,7 +11,6 @@ use Illuminate\Support\Collection; * Class Chapter. * * @property Collection $pages - * @property string $description * @property ?int $default_template_id * @property ?Page $defaultTemplate */ @@ -61,6 +60,7 @@ class Chapter extends BookChild /** * Get the visible pages in this chapter. + * @returns Collection */ public function getVisiblePages(): Collection { @@ -70,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(); - } }