X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/03073dd9e413d20d385cb4a90cbce420fa5614c1..refs/pull/1444/head:/app/Http/Controllers/HomeController.php diff --git a/app/Http/Controllers/HomeController.php b/app/Http/Controllers/HomeController.php index c5f3cd02a..ba93bfe65 100644 --- a/app/Http/Controllers/HomeController.php +++ b/app/Http/Controllers/HomeController.php @@ -67,6 +67,9 @@ class HomeController extends Controller if ($homepageOption === 'bookshelves') { $shelves = $this->entityRepo->getAllPaginated('bookshelf', 18, $commonData['sort'], $commonData['order']); + foreach ($shelves as $shelf) { + $shelf->books = $this->entityRepo->getBookshelfChildren($shelf); + } $data = array_merge($commonData, ['shelves' => $shelves]); return view('common.home-shelves', $data); }