2015-08-30 12:34:43 -04:00
|
|
|
<?php
|
2016-04-20 21:06:02 -04:00
|
|
|
|
2016-11-27 21:49:34 -05:00
|
|
|
// music design #1
|
|
|
|
$app->get('/music1', function() use($app) {
|
2016-04-20 21:06:02 -04:00
|
|
|
|
2016-11-27 21:49:34 -05:00
|
|
|
$albums = $app->album->all()->sortByDesc('release_date')->values()->all();
|
2016-04-21 00:27:42 -04:00
|
|
|
$songs = $albums[0]->songs;
|
2016-12-06 17:11:42 -05:00
|
|
|
$links = $albums[0]->links;
|
2016-04-20 23:11:33 -04:00
|
|
|
|
2016-11-28 18:10:55 -05:00
|
|
|
$app->render('pages/music1.twig', [
|
2016-11-27 21:49:34 -05:00
|
|
|
'albums' => $albums,
|
2016-04-21 00:27:42 -04:00
|
|
|
'songs' => $songs,
|
2016-12-06 17:11:42 -05:00
|
|
|
'links' => $links,
|
2016-11-27 21:49:34 -05:00
|
|
|
]);
|
2015-08-30 12:34:43 -04:00
|
|
|
|
2016-11-27 21:49:34 -05:00
|
|
|
})->name('music1');
|
|
|
|
|
|
|
|
# music design #2
|
|
|
|
$app->get('/music2', function() use($app) {
|
|
|
|
|
|
|
|
$albums = $app->album->all()->sortByDesc('release_date')->values()->all();
|
|
|
|
$songs = $albums[0]->songs;
|
2016-12-06 17:11:42 -05:00
|
|
|
$links = $albums[0]->links;
|
2016-11-27 21:49:34 -05:00
|
|
|
|
2016-12-06 17:11:42 -05:00
|
|
|
$app->render('pages/music1.twig', [
|
2016-11-27 21:49:34 -05:00
|
|
|
'albums' => $albums,
|
|
|
|
'songs' => $songs,
|
2016-12-06 17:11:42 -05:00
|
|
|
'links' => $links,
|
2016-11-27 21:49:34 -05:00
|
|
|
]);
|
|
|
|
|
|
|
|
})->name('music2');
|