website/app/routes/pages/music.php
2016-12-06 17:30:55 -05:00

32 lines
683 B
PHP
Executable File

<?php
// music design #1
$app->get('/music1', function() use($app) {
$albums = $app->album->all()->sortByDesc('release_date')->values()->all();
$songs = $albums[0]->songs;
$links = $albums[0]->links;
$app->render('pages/music1.twig', [
'albums' => $albums,
'songs' => $songs,
'links' => $links,
]);
})->name('music1');
# music design #2
$app->get('/music2', function() use($app) {
$albums = $app->album->all()->sortByDesc('release_date')->values()->all();
$songs = $albums[0]->songs;
$links = $albums[0]->links;
$app->render('pages/music2.twig', [
'albums' => $albums,
'songs' => $songs,
'links' => $links,
]);
})->name('music2');