2015-08-30 12:34:43 -04:00
|
|
|
<?php
|
2016-04-20 21:06:02 -04:00
|
|
|
|
2015-08-30 12:34:43 -04:00
|
|
|
$app->get('/music', function() use($app) {
|
2016-04-20 21:06:02 -04:00
|
|
|
|
2016-04-21 00:37:09 -04:00
|
|
|
$albums = $app->album->all()->sortByDesc('release_date')->values()->all();
|
2016-04-21 00:27:42 -04:00
|
|
|
$songs = $albums[0]->songs;
|
2016-04-20 23:11:33 -04:00
|
|
|
|
|
|
|
$app->render('music.twig', [
|
|
|
|
'albums' => $albums,
|
2016-04-21 00:27:42 -04:00
|
|
|
'songs' => $songs,
|
2016-04-20 23:11:33 -04:00
|
|
|
]);
|
2015-08-30 12:34:43 -04:00
|
|
|
|
|
|
|
})->name('music');
|