]>
BookStack Code Mirror - bookstack/blobdiff - app/Http/Controllers/HomeController.php
projects
/
bookstack
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Updated composer deps, applied StyleCI changes
[bookstack]
/
app
/
Http
/
Controllers
/
HomeController.php
diff --git
a/app/Http/Controllers/HomeController.php
b/app/Http/Controllers/HomeController.php
index 5451c0abfe8289730e26649eec36c713aa3c5d36..f38bd71dfc7ea456a9e5e46f74140035ba777c91 100644
(file)
--- a/
app/Http/Controllers/HomeController.php
+++ b/
app/Http/Controllers/HomeController.php
@@
-2,7
+2,7
@@
namespace BookStack\Http\Controllers;
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;
use BookStack\Entities\Models\Book;
use BookStack\Entities\Models\Page;
use BookStack\Entities\Queries\RecentlyViewed;
@@
-16,9
+16,9
@@
class HomeController extends Controller
/**
* Display the homepage.
*/
/**
* Display the homepage.
*/
- public function index()
+ public function index(
ActivityQueries $activities
)
{
{
- $activity =
Activity::
latest(10);
+ $activity =
$activities->
latest(10);
$draftPages = [];
if ($this->isSignedIn()) {
$draftPages = [];
if ($this->isSignedIn()) {
@@
-39,7
+39,7
@@
class HomeController extends Controller
$recentlyUpdatedPages = Page::visible()->with('book')
->where('draft', false)
->orderBy('updated_at', 'desc')
$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();
->select(Page::$listAttributes)
->get();
@@
-107,14
+107,6
@@
class HomeController extends Controller
return view('home.default', $commonData);
}
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.
*/
/**
* Show the view for /robots.txt.
*/