Added number of photos to admin index
This commit is contained in:
parent
a386d1b893
commit
1101432693
@ -9,6 +9,7 @@ use App\Facade\UserConfig;
|
|||||||
use App\Helpers\ConfigHelper;
|
use App\Helpers\ConfigHelper;
|
||||||
use App\Http\Controllers\Controller;
|
use App\Http\Controllers\Controller;
|
||||||
use App\Http\Requests\SaveSettingsRequest;
|
use App\Http\Requests\SaveSettingsRequest;
|
||||||
|
use App\Photo;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
use Illuminate\Support\Facades\DB;
|
use Illuminate\Support\Facades\DB;
|
||||||
|
|
||||||
@ -19,9 +20,11 @@ class DefaultController extends Controller
|
|||||||
$this->authorize('admin-access');
|
$this->authorize('admin-access');
|
||||||
|
|
||||||
$albumCount = Album::all()->count();
|
$albumCount = Album::all()->count();
|
||||||
|
$photoCount = Photo::all()->count();
|
||||||
|
|
||||||
return Theme::render('admin.index', [
|
return Theme::render('admin.index', [
|
||||||
'album_count' => $albumCount
|
'album_count' => $albumCount,
|
||||||
|
'photo_count' => $photoCount
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -16,5 +16,6 @@ return [
|
|||||||
'settings_saved_message' => 'The settings were updated successfully.',
|
'settings_saved_message' => 'The settings were updated successfully.',
|
||||||
'settings_title' => 'Settings',
|
'settings_title' => 'Settings',
|
||||||
'stats_albums' => 'album|albums',
|
'stats_albums' => 'album|albums',
|
||||||
'stats_panel' => 'Statistics'
|
'stats_panel' => 'Statistics',
|
||||||
|
'stats_photos' => 'photo|photos'
|
||||||
];
|
];
|
@ -11,7 +11,8 @@
|
|||||||
<p>
|
<p>
|
||||||
<a href="{{ route('albums.index') }}">
|
<a href="{{ route('albums.index') }}">
|
||||||
<b>{{ $album_count }}</b> {{ trans_choice('admin.stats_albums', $album_count) }}
|
<b>{{ $album_count }}</b> {{ trans_choice('admin.stats_albums', $album_count) }}
|
||||||
</a>
|
</a><br/>
|
||||||
|
<b>{{ $photo_count }}</b> {{ trans_choice('admin.stats_photos', $photo_count) }}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user