diff --git a/resources/views/admin/index.tpl b/resources/views/admin/index.tpl
index 4669ace2..54fb45d6 100644
--- a/resources/views/admin/index.tpl
+++ b/resources/views/admin/index.tpl
@@ -25,7 +25,7 @@
{{ trans('admin.index.total-users') }}
- {{ App\Models\User::all()->count() }}
+ {{ App\Models\User::count() }}
@@ -37,7 +37,7 @@
{{ trans('admin.index.total-players') }}
- {{ App\Models\Player::all()->count() }}
+ {{ App\Models\Player::count() }}
@@ -48,7 +48,7 @@
{{ trans('admin.index.total-textures') }}
- {{ \Database::table('textures')->getRecordNum() }}
+ {{ App\Models\Texture::count() }}
@@ -56,7 +56,7 @@
{{ trans('admin.index.disk-usage') }}
- fetchArray("SELECT SUM(`size`) AS total_size FROM `{table}` WHERE 1")['total_size'] ?: 0; ?>
+ sum('size') ?: 0; ?>
{{ $size > 1024 ? round($size / 1024, 1)."MB" : $size."KB" }}
@@ -83,97 +83,76 @@
-
@endsection
@section('script')
-