website/app/routes/music.php

14 lines
259 B
PHP
Raw Normal View History

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