diff --git a/app/Http/Controllers/Admin/DefaultController.php b/app/Http/Controllers/Admin/DefaultController.php index d6b1c6d..f0bbe86 100644 --- a/app/Http/Controllers/Admin/DefaultController.php +++ b/app/Http/Controllers/Admin/DefaultController.php @@ -9,6 +9,7 @@ use App\Facade\UserConfig; use App\Helpers\ConfigHelper; use App\Http\Controllers\Controller; use App\Http\Requests\SaveSettingsRequest; +use App\Photo; use Illuminate\Http\Request; use Illuminate\Support\Facades\DB; @@ -19,9 +20,11 @@ class DefaultController extends Controller $this->authorize('admin-access'); $albumCount = Album::all()->count(); + $photoCount = Photo::all()->count(); return Theme::render('admin.index', [ - 'album_count' => $albumCount + 'album_count' => $albumCount, + 'photo_count' => $photoCount ]); } diff --git a/resources/lang/en/admin.php b/resources/lang/en/admin.php index 3bb6e9c..0f05aac 100644 --- a/resources/lang/en/admin.php +++ b/resources/lang/en/admin.php @@ -16,5 +16,6 @@ return [ 'settings_saved_message' => 'The settings were updated successfully.', 'settings_title' => 'Settings', 'stats_albums' => 'album|albums', - 'stats_panel' => 'Statistics' + 'stats_panel' => 'Statistics', + 'stats_photos' => 'photo|photos' ]; \ No newline at end of file diff --git a/resources/views/themes/base/admin/index.blade.php b/resources/views/themes/base/admin/index.blade.php index 3a62e73..952eb12 100644 --- a/resources/views/themes/base/admin/index.blade.php +++ b/resources/views/themes/base/admin/index.blade.php @@ -11,7 +11,8 @@
{{ $album_count }} {{ trans_choice('admin.stats_albums', $album_count) }}
-
+
+ {{ $photo_count }} {{ trans_choice('admin.stats_photos', $photo_count) }}