bookRepo = $bookRepo; parent::__construct(); } /** * Display the homepage. * * @return Response */ public function index() { $activity = Activity::latest(); $recents = $this->signedIn ? Views::getUserRecentlyViewed(10, 0) : $this->bookRepo->getLatest(10); return view('home', ['activity' => $activity, 'recents' => $recents]); } }