diff --git a/app/Http/Controllers/SiteController.php b/app/Http/Controllers/SiteController.php index d1274b9dc..d7ab96480 100644 --- a/app/Http/Controllers/SiteController.php +++ b/app/Http/Controllers/SiteController.php @@ -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() diff --git a/resources/views/layouts/partial/footer.blade.php b/resources/views/layouts/partial/footer.blade.php index b2a1e6a4c..0dab40fdd 100644 --- a/resources/views/layouts/partial/footer.blade.php +++ b/resources/views/layouts/partial/footer.blade.php @@ -8,7 +8,7 @@ {{__('site.privacy')}} API {{__('site.language')}} - Powered by PixelFed + Powered by PixelFed
diff --git a/resources/views/site/about.blade.php b/resources/views/site/about.blade.php index 765b775b8..76b8bd7a4 100644 --- a/resources/views/site/about.blade.php +++ b/resources/views/site/about.blade.php @@ -9,7 +9,7 @@{{$stats['posts']}}
+Posts
+{{$stats['users']}}
+Users
++ + @{{$stats['admin']->username}} + +
+Instance Admin
+