Update about page with stats and instance admin
This commit is contained in:
parent
1518cce4fc
commit
794cf80c15
2 changed files with 37 additions and 2 deletions
|
@ -68,7 +68,14 @@ class SiteController extends Controller
|
|||
|
||||
public function about()
|
||||
{
|
||||
return view('site.about');
|
||||
$stats = Cache::remember('site:about:stats', 1440, function() {
|
||||
return [
|
||||
'posts' => Status::whereLocal(true)->count(),
|
||||
'users' => User::count(),
|
||||
'admin' => User::whereIsAdmin(true)->first()
|
||||
];
|
||||
});
|
||||
return view('site.about', compact('stats'));
|
||||
}
|
||||
|
||||
public function language()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue