From 06a67bb4bb2a786132f4731a14168446eb403356 Mon Sep 17 00:00:00 2001 From: stanjg Date: Sat, 5 May 2018 10:39:20 +0200 Subject: [PATCH] Cleaned up some duplicate code --- app/Http/Controllers/Admin/StatisticsController.php | 4 ---- resources/themes/pterodactyl/admin/statistics.blade.php | 4 ++-- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/app/Http/Controllers/Admin/StatisticsController.php b/app/Http/Controllers/Admin/StatisticsController.php index 119adb08..a3777e4e 100644 --- a/app/Http/Controllers/Admin/StatisticsController.php +++ b/app/Http/Controllers/Admin/StatisticsController.php @@ -38,8 +38,6 @@ class StatisticsController extends Controller $totalServerDisk = DB::table('servers')->sum('disk'); $totalNodeDisk = DB::table('nodes')->sum('disk'); $totalAllocations = Allocation::count(); - $totalUsersCount = User::count(); - $totalDBCount = Database::count(); $suspendedServersCount = Server::where('suspended', true)->count(); @@ -71,8 +69,6 @@ class StatisticsController extends Controller 'totalNodeDisk' => $totalNodeDisk, 'totalServerDisk' => $totalServerDisk, 'totalAllocations' => $totalAllocations, - 'totalUsersCount' => $totalUsersCount, - 'totalDBCount' => $totalDBCount, ]); } diff --git a/resources/themes/pterodactyl/admin/statistics.blade.php b/resources/themes/pterodactyl/admin/statistics.blade.php index dff5019e..46e11233 100644 --- a/resources/themes/pterodactyl/admin/statistics.blade.php +++ b/resources/themes/pterodactyl/admin/statistics.blade.php @@ -109,7 +109,7 @@
Total Users - {{ $totalUsersCount }} + {{ $usersCount }}
@@ -127,7 +127,7 @@
Total Databases - {{ $totalDBCount }} + {{ $databasesCount }}