- $books = $this->bookRepo->getAll();
- return view('books/index', ['books' => $books]);
+ $books = $this->bookRepo->getAllPaginated(10);
+ $recents = $this->signedIn ? $this->bookRepo->getRecentlyViewed(4, 0) : false;
+ $popular = $this->bookRepo->getPopular(4, 0);
+ $this->setPageTitle('Books');
+ return view('books/index', ['books' => $books, 'recents' => $recents, 'popular' => $popular]);