]> BookStack Code Mirror - bookstack/blobdiff - app/Entities/Models/Chapter.php
Perms: Fixed some issues made when adding transactions
[bookstack] / app / Entities / Models / Chapter.php
index 422c82442fe8d203ed63cffd404eefa03af96c92..088d199da675286af90ea73c3f24ca396ede2347 100644 (file)
@@ -60,6 +60,7 @@ class Chapter extends BookChild
 
     /**
      * Get the visible pages in this chapter.
+     * @returns Collection<Page>
      */
     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();
-    }
 }