X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/ae95d0a239cf5f7406f6af7e2b25fd5be94a8ad0..refs/pull/63/head:/app/Http/Controllers/HomeController.php diff --git a/app/Http/Controllers/HomeController.php b/app/Http/Controllers/HomeController.php index 3ed1da4c1..8fd1c1009 100644 --- a/app/Http/Controllers/HomeController.php +++ b/app/Http/Controllers/HomeController.php @@ -1,14 +1,13 @@ activityService = $activityService; $this->bookRepo = $bookRepo; parent::__construct(); } @@ -36,9 +33,9 @@ class HomeController extends Controller */ public function index() { - $books = $this->bookRepo->getAll(); - $activity = $this->activityService->latest(); - return view('home', ['books' => $books, 'activity' => $activity]); + $activity = Activity::latest(); + $recents = $this->signedIn ? Views::getUserRecentlyViewed(10, 0) : $this->bookRepo->getLatest(10); + return view('home', ['activity' => $activity, 'recents' => $recents]); } }