Use function to call paginator

This commit is contained in:
DariusIII
2018-05-12 22:59:36 +02:00
parent e551a3b901
commit 3beb5f514e
9 changed files with 24 additions and 9 deletions
+1 -1
View File
@@ -54,7 +54,7 @@ class BooksController extends BasePageController
$page = $request->has('page') ? $request->input('page') : 1;
$offset = ($page - 1) * config('nntmux.items_per_cover_page');
$rslt = $book->getBookRange($page, $catarray, $offset, config('nntmux.items_per_cover_page'), $orderby, $this->userdata['categoryexclusions']);
$results = new LengthAwarePaginator($rslt, $rslt['_totalcount'], config('nntmux.items_per_cover_page'), $page, ['path' => $request->url()]);
$results = $this->paginate($rslt, $rslt['_totalcount'], config('nntmux.items_per_cover_page'), $page, $request->url());
$maxwords = 50;
foreach ($results as $result) {
if (! empty($result->overview)) {