1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-07-31 15:24:31 +03:00

Queries: Moved out or removed some class-level items

Also ran auto-removal of unused imports across app folder.
This commit is contained in:
Dan Brown
2024-02-07 22:41:45 +00:00
parent 546cfb0dcc
commit b77ab6f3af
29 changed files with 85 additions and 107 deletions

View File

@ -69,13 +69,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();
}
}