1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-12-17 22:02:15 +03:00

Add settings for number of books/shelves that will be displayed per page

This commit is contained in:
Joshua Booth
2025-05-13 20:17:36 +01:00
parent 3e99ce4098
commit b6110ed3cd
5 changed files with 42 additions and 4 deletions

View File

@@ -48,7 +48,7 @@ class BookController extends Controller
$books = $this->queries->visibleForListWithCover()
->orderBy($listOptions->getSort(), $listOptions->getOrder())
->paginate(18);
->paginate(intval(setting('sorting-books-per-page', '18')));
$recents = $this->isSignedIn() ? $this->queries->recentlyViewedForCurrentUser()->take(4)->get() : false;
$popular = $this->queries->popularForList()->take(4)->get();
$new = $this->queries->visibleForList()->orderBy('created_at', 'desc')->take(4)->get();