Method |
Description |
|
__construct ( PageRepo $pageRepo, ChapterRepo $chapterRepo ) |
BookRepo constructor. |
|
createFromInput ( array $input ) : Book |
Get a new book instance from request input. |
|
destroy ( Book $book ) |
Destroy the given book. |
|
doesSlugExist ( string $slug, boolean | false $currentId = false ) : boolean |
|
|
exists ( $id ) : boolean |
Checks if a book exists. |
|
findSuitableSlug ( string $name, boolean | false $currentId = false ) : string |
Provides a suitable slug for the given book name. |
|
getAll ( integer $count = 10 ) : mixed |
Get all books, Limited by count. |
|
getAllPaginated ( integer $count = 10 ) : mixed |
Get all books paginated. |
|
getById ( $id ) : mixed |
Get the book that has the given id. |
|
getBySearch ( $term, integer $count = 20, array $paginationAppends = [] ) : mixed |
Get books by search term. |
|
getBySlug ( $slug ) : mixed |
Get a book by slug |
|
getChildren ( Book $book, boolean $filterDrafts = false ) : mixed |
Get all child objects of a book. |
|
getLatest ( integer $count = 10 ) : mixed |
Get the latest books. |
|
getNewPriority ( Book $book ) : integer |
Get the next child element priority. |
|
getPopular ( integer $count = 10, integer $page ) : mixed |
Gets the most viewed books. |
|
getRecentlyViewed ( integer $count = 10, integer $page ) : mixed |
Gets the most recently viewed for a user. |
|
updateFromInput ( Book $book, $input ) : Book |
Update the given book from user input. |
|