namespace BookStack\Http\Controllers;
-use Activity;
+use BookStack\Actions\ActivityQueries;
use BookStack\Entities\Models\Book;
use BookStack\Entities\Models\Page;
use BookStack\Entities\Queries\RecentlyViewed;
/**
* Display the homepage.
*/
- public function index()
+ public function index(ActivityQueries $activities)
{
- $activity = Activity::latest(10);
+ $activity = $activities->latest(10);
$draftPages = [];
if ($this->isSignedIn()) {
$recentlyUpdatedPages = Page::visible()->with('book')
->where('draft', false)
->orderBy('updated_at', 'desc')
- ->take($favourites->count() > 0 ? 6 : 12)
+ ->take($favourites->count() > 0 ? 5 : 10)
->select(Page::$listAttributes)
->get();
return view('home.default', $commonData);
}
- /**
- * Get custom head HTML, Used in ajax calls to show in editor.
- */
- public function customHeadContent()
- {
- return view('common.custom-head');
- }
-
/**
* Show the view for /robots.txt.
*/