blue-twilight/app/Http/Controllers/Admin/DefaultController.php

22 lines
430 B
PHP

<?php
namespace App\Http\Controllers\Admin;
use App\Album;
use App\Facade\Theme;
use App\Http\Controllers\Controller;
use Illuminate\Support\Facades\DB;
class DefaultController extends Controller
{
public function index()
{
$this->authorize('admin-access');
$albumCount = Album::all()->count();
return Theme::render('admin.index', [
'album_count' => $albumCount
]);
}
}