Метод |
Описание |
|
__construct ( PageRepo $pageRepo ) |
ChapterRepo constructor. |
|
changeBook ( $bookId, Chapter $chapter, boolean $rebuildPermissions = false ) : Chapter |
Changes the book relation of this chapter. |
|
createFromInput ( $input, Book $book ) : Chapter |
Create a new chapter from request input. |
|
destroy ( Chapter $chapter ) |
Destroy a chapter and its relations by providing its slug. |
|
doesSlugExist ( $slug, $bookId, boolean | false $currentId = false ) : boolean |
Check if a chapter's slug exists. |
|
findSuitableSlug ( $name, $bookId, boolean | false $currentId = false ) : string |
Finds a suitable slug for the provided name. |
|
getAll ( ) : Illuminate\Database\Eloquent\Collection | static[] |
Get all chapters. |
|
getById ( $id ) : mixed |
Get a chapter by a specific id. |
|
getBySearch ( string $term, array $whereTerms = [], integer $count = 20, array $paginationAppends = [] ) : mixed |
Get chapters by the given search term. |
|
getBySlug ( $slug, $bookId ) : mixed |
Get a chapter that has the given slug within the given book. |
|
getChildren ( Chapter $chapter ) |
Get the child items for a chapter |
|
getNewPriority ( Chapter $chapter ) : integer |
Get a new priority value for a new page to be added
to the given chapter. |
|
idExists ( $id ) : boolean |
Check if an id exists. |
|