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