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

Merge branch 'feature/pagination_settings' of github.com:Xenoamor/BookStack into Xenoamor-feature/pagination_settings

This commit is contained in:
Dan Brown
2025-12-06 21:47:13 +00:00
5 changed files with 42 additions and 4 deletions

View File

@@ -52,7 +52,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();