blue-twilight/app/Http/Controllers/Gallery/DefaultController.php
2016-09-05 14:06:41 +01:00

19 lines
371 B
PHP

<?php
namespace App\Http\Controllers\Gallery;
use App\Album;
use App\Facade\Theme;
use App\Http\Controllers\Controller;
class DefaultController extends Controller
{
public function index()
{
$albums = Album::withCount('photos')->get()->sortBy('name');
return Theme::render('gallery.index', [
'albums' => $albums
]);
}
}